ops
ops copied to clipboard
consider breaking out ops functionality into a library separate from the cli side
there's definitely arguments here for being able to include the major functionality here into a library so that it can be used w/in say a webserver
We're already separating by package the library (lepton
) from cli side (cmd
) what allows its usage in a different application.
It requires some knowledge of the library internals to be used though. I think we should expose a public interface.
See below some brainstorming examples.
ops := ops.New()
imgPath := ops.Image.Create(program,config)
ops.Hypervisor.Run(config)
ops.Provider("gcp").Image.Create(config)
ops.GCP().Instance.Create(config)