Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ExitCodeNotFound is an exit code that indicates a Not Found error ExitCodeNotFound int = 30 // ExitCodeDuplicate is an exit code that indicates a duplicate error ExitCodeDuplicate int = 31 )
View Source
const ( // Version v0.1.0 Version010 = "v0.1.0" // Version v0.1.1 Version011 = "v0.1.1" )
Variables ¶
This section is empty.
Functions ¶
func GetBoostrapParamsFromStdin ¶
func GetBoostrapParamsFromStdin(c ExecutionCommand) (params.BootstrapInstance, error)
func ResolveErrorToExitCode ¶
Types ¶
type ExecutionCommand ¶
type ExecutionCommand string
const ( CreateInstanceCommand ExecutionCommand = "CreateInstance" DeleteInstanceCommand ExecutionCommand = "DeleteInstance" GetInstanceCommand ExecutionCommand = "GetInstance" ListInstancesCommand ExecutionCommand = "ListInstances" StartInstanceCommand ExecutionCommand = "StartInstance" StopInstanceCommand ExecutionCommand = "StopInstance" RemoveAllInstancesCommand ExecutionCommand = "RemoveAllInstances" GetVersionCommand ExecutionCommand = "GetVersion" )
const ( GetSupportedInterfaceVersionsCommand ExecutionCommand = "GetSupportedInterfaceVersions" ValidatePoolInfoCommand ExecutionCommand = "ValidatePoolInfo" GetConfigJSONSchemaCommand ExecutionCommand = "GetConfigJSONSchema" GetExtraSpecsJSONSchemaCommand ExecutionCommand = "GetExtraSpecsJSONSchema" )
V0.1.1 commands
type ExternalProvider ¶
type ExternalProvider interface { // CreateInstance creates a new compute instance in the provider. CreateInstance(ctx context.Context, bootstrapParams params.BootstrapInstance) (params.ProviderInstance, error) // Delete instance will delete the instance in a provider. DeleteInstance(ctx context.Context, instance string) error // GetInstance will return details about one instance. GetInstance(ctx context.Context, instance string) (params.ProviderInstance, error) // ListInstances will list all instances for a provider. ListInstances(ctx context.Context, poolID string) ([]params.ProviderInstance, error) // RemoveAllInstances will remove all instances created by this provider. RemoveAllInstances(ctx context.Context) error // Stop shuts down the instance. Stop(ctx context.Context, instance string, force bool) error // Start boots up an instance. Start(ctx context.Context, instance string) error // GetVersion returns the version of the provider. GetVersion(ctx context.Context) string }
ExternalProvider defines a common interface that external providers need to implement. This is very similar to the common.Provider interface, and was redefined here to decouple it, in case it may diverge from native providers.
Click to show internal directories.
Click to hide internal directories.