Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StoppedGracefully indicates the machine was stopped gracefully. StoppedGracefully = StoppedOK(true) // StoppedForcefully indicates that the machine did not stop gracefully // and the shutdown had to be forced. StoppedForcefully = StoppedOK(false) )
Functions ¶
func FetchMetadataIfExists ¶
FetchMetadataIfExists fetches the metadata from a metadata file in the required directory, if the file exists. Returns a MDRun pointer, if file exists, a boolean indicating if metadata file existed and an error, if metadata lookup went wrong.
func WriteMetadataToFile ¶
WriteMetadataToFile writes a run metadata to file under the cache directory.
Types ¶
type Provider ¶
type Provider interface { // Start starts the VMM. Start(context.Context) (StartedMachine, error) WithHandlersAdapter(firecracker.HandlersAdapter) Provider WithVethIfaceName(string) Provider }
Provider abstracts the configuration required to start a VMM.
func NewDefaultProvider ¶
func NewDefaultProvider(cniConfig *configs.CNIConfig, jailingFcConfig *configs.JailingFirecrackerConfig, machineConfig *configs.MachineConfig) Provider
NewDefaultProvider creates a default provider.
type StartedMachine ¶
type StartedMachine interface { // Cleanup handles cleanup when the machine is stopped from outside of the controlling process. Cleanup(chan bool) // Decorates metadata with additional properties. DecorateMetadata(*metadata.MDRun) error // Stop stops the VMM, remote connected client may be nil. Stop(context.Context) StoppedOK // StopAndWait stops the VMM and waits for the VMM to stop, remote connected client may be nil. StopAndWait(context.Context) // Wait awaits for the VMM exit. Wait(context.Context) }
StartedMachine abstracts a started Firecracker VMM.
Click to show internal directories.
Click to hide internal directories.