Lifecycle defines basic lifecycle operations.
| 18 | |
| 19 | // Lifecycle defines basic lifecycle operations. |
| 20 | type Lifecycle interface { |
| 21 | // Validate returns error if the current driver isn't support for given config |
| 22 | Validate(_ context.Context) error |
| 23 | |
| 24 | // Create is called on creating the instance for the first time. |
| 25 | // (e.g., creating "vz-identifier" file) |
| 26 | // |
| 27 | // Create MUST return nil when it is called against an existing instance. |
| 28 | // |
| 29 | // Create does not create the disks. |
| 30 | Create(_ context.Context) error |
| 31 | |
| 32 | // CreateDisk returns error if the current driver fails in creating disk |
| 33 | CreateDisk(_ context.Context) error |
| 34 | |
| 35 | // Start is used for booting the vm using driver instance |
| 36 | // It returns a chan error on successful boot |
| 37 | // The second argument may contain error occurred while starting driver |
| 38 | Start(_ context.Context) (chan error, error) |
| 39 | |
| 40 | // Stop will terminate the running vm instance. |
| 41 | // It returns error if there are any errors during Stop |
| 42 | Stop(_ context.Context) error |
| 43 | |
| 44 | Delete(_ context.Context) error |
| 45 | |
| 46 | InspectStatus(_ context.Context, inst *limatype.Instance) string |
| 47 | |
| 48 | // BootScripts returns the content of boot scripts to be injected into the vm. |
| 49 | // The key must be "boot.<OS>/<SCRIPT>" or "<SCRIPT>" (deprecated alias for "boot.Linux/<SCRIPT>"). |
| 50 | BootScripts(ctx context.Context) (map[string][]byte, error) |
| 51 | } |
| 52 | |
| 53 | // GUI defines GUI-related operations. |
| 54 | type GUI interface { |
no outgoing calls
no test coverage detected