Documentation ¶
Index ¶
- func CreateKey(keyValues ...string) string
- type Builder
- func (b *Builder) AutoInitialize() error
- func (b *Builder) Delete() error
- func (b *Builder) GetLocalBuildState() (bool, bool)
- func (b *Builder) Initialize() error
- func (b *Builder) Launch() error
- func (b *Builder) Migrate() error
- func (b *Builder) Output() *map[string]terraform.Output
- func (b *Builder) Resume() error
- func (b *Builder) SetRebuildInstanceData() error
- func (b *Builder) SetRebuildInstances() error
- func (b *Builder) ShowLaunchPlan() error
- func (b *Builder) Suspend() error
- type InstanceStateChange
- type ManagedInstance
- func (i *ManagedInstance) CanConnect() (bool, error)
- func (i *ManagedInstance) Description() string
- func (i *ManagedInstance) FQDN() string
- func (i *ManagedInstance) GetEndpoint() (string, error)
- func (i *ManagedInstance) HttpsClient() (*http.Client, string, error)
- func (i *ManagedInstance) Name() string
- func (i *ManagedInstance) NonRootPassword() string
- func (i *ManagedInstance) NonRootUser() string
- func (i *ManagedInstance) PublicIP() string
- func (i *ManagedInstance) RootPassword() string
- func (i *ManagedInstance) RootUser() string
- func (i *ManagedInstance) SSHAddress() string
- func (i *ManagedInstance) SSHKey() []byte
- func (i *ManagedInstance) SSHUser() string
- func (i *ManagedInstance) State() (cloud.InstanceState, error)
- type Target
- func (t *Target) CanUpdate() bool
- func (t *Target) CanUseAsEgressNode() bool
- func (t *Target) Copy() (*Target, error)
- func (t *Target) CreateDeviceConnectKeyPair() (string, string, error)
- func (t *Target) DeleteBackend() error
- func (t *Target) Dependencies() []*Target
- func (t *Target) DeploymentName() string
- func (t *Target) Description() string
- func (t *Target) Error() error
- func (t *Target) GetApiCARoot() string
- func (t *Target) GetEndpoint() (string, error)
- func (t *Target) GetIaaS() string
- func (t *Target) GetLastSeen() uint64
- func (t *Target) GetPublicKey() string
- func (t *Target) GetRecipe() string
- func (t *Target) GetRegion() string
- func (t *Target) GetSpaceID() string
- func (t *Target) GetSpaceName() string
- func (t *Target) GetStatus() string
- func (t *Target) GetVersion() string
- func (t *Target) HasAdminAccess() bool
- func (t *Target) HasDependents() bool
- func (t *Target) IsRunning() bool
- func (t *Target) IsSpaceOwned() bool
- func (t *Target) Key() string
- func (t *Target) ManagedInstance(name string) *ManagedInstance
- func (t *Target) ManagedInstances() []*ManagedInstance
- func (t *Target) Name() string
- func (t *Target) NewBuilder(buildVars map[string]string, outputBuffer, errorBuffer io.Writer) (*Builder, error)
- func (t *Target) PrepareBackend() error
- func (t *Target) Refresh()
- func (t *Target) RestApiClient(ctx pcontext.Context) (*rest.RestApiClient, error)
- func (t *Target) Resume(cb InstanceStateChange) error
- func (t *Target) SetOutput(output *map[string]terraform.Output)
- func (t *Target) Status() TargetState
- func (t *Target) Suspend(cb InstanceStateChange) error
- func (t *Target) UpdateKeys() (*Target, error)
- func (t *Target) Version() string
- type TargetSet
- func (ts *TargetSet) DeleteTarget(key string)
- func (ts *TargetSet) GetDisabledTargetRecipes() []cookbook.CookbookRecipeInfo
- func (ts *TargetSet) GetTarget(name string) *Target
- func (ts *TargetSet) GetTargets() []*Target
- func (ts *TargetSet) Lookup(keyValues ...string) []*Target
- func (ts *TargetSet) MarshalJSON() ([]byte, error)
- func (ts *TargetSet) SaveTarget(key string, target *Target) error
- func (ts *TargetSet) UnmarshalJSON(b []byte) error
- type TargetState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder( pathKey string, cookbookRecipe, cloudProvider, cloudBackend config.Configurable, additonalInputs map[string]string, outputBuffer, errorBuffer io.Writer, ) (*Builder, error)
in: cookbookRecipe - the recipe to create a launcher for in: cloudProvider - the cloud provider for the cloud to launch the recipe in in: cloudBackend - the backend where launch state will be saved in: outputBuffer - buffer to redirect the stdout from CLI execution in: errorBuffer - buffer to redirect the stderr from CLI execution
func (*Builder) AutoInitialize ¶
initialize if not initialized
func (*Builder) GetLocalBuildState ¶
this build's local state - is build's run state present - is build's resource state local
func (*Builder) SetRebuildInstanceData ¶
taints deployed instance's attached data resources so they are rebuilt next time launch is called
func (*Builder) SetRebuildInstances ¶
taints deployed instance resources so they are rebuilt next time launch is called
type InstanceStateChange ¶
type InstanceStateChange func(name string, instance *ManagedInstance)
Instance state callback
type ManagedInstance ¶
type ManagedInstance struct { Instance cloud.ComputeInstance Metadata map[string]interface{} // contains filtered or unexported fields }
func (*ManagedInstance) CanConnect ¶
func (i *ManagedInstance) CanConnect() (bool, error)
func (*ManagedInstance) Description ¶
func (i *ManagedInstance) Description() string
func (*ManagedInstance) FQDN ¶
func (i *ManagedInstance) FQDN() string
func (*ManagedInstance) GetEndpoint ¶
func (i *ManagedInstance) GetEndpoint() (string, error)
func (*ManagedInstance) HttpsClient ¶
func (i *ManagedInstance) HttpsClient() (*http.Client, string, error)
func (*ManagedInstance) Name ¶
func (i *ManagedInstance) Name() string
func (*ManagedInstance) NonRootPassword ¶
func (i *ManagedInstance) NonRootPassword() string
func (*ManagedInstance) NonRootUser ¶
func (i *ManagedInstance) NonRootUser() string
func (*ManagedInstance) PublicIP ¶
func (i *ManagedInstance) PublicIP() string
func (*ManagedInstance) RootPassword ¶
func (i *ManagedInstance) RootPassword() string
func (*ManagedInstance) RootUser ¶
func (i *ManagedInstance) RootUser() string
func (*ManagedInstance) SSHAddress ¶
func (i *ManagedInstance) SSHAddress() string
func (*ManagedInstance) SSHKey ¶
func (i *ManagedInstance) SSHKey() []byte
func (*ManagedInstance) SSHUser ¶
func (i *ManagedInstance) SSHUser() string
func (*ManagedInstance) State ¶
func (i *ManagedInstance) State() (cloud.InstanceState, error)
type Target ¶
type Target struct { RecipeName string `json:"recipeName"` RecipeIaas string `json:"recipeIaas"` CookbookName string `json:"cookbookName,omitempty"` CookbookVersion string `json:"cookbookVersion,omitempty"` RepoTimestamp string `json:"repoTimestamp,omitempty"` DependentTargets []string `json:"dependentTargets"` Recipe cookbook.Recipe `json:"recipe,omitempty"` Provider provider.CloudProvider `json:"provider,omitempty"` Backend backend.CloudBackend `json:"backend,omitempty"` Output *map[string]terraform.Output `json:"output,omitempty"` RSAPrivateKey string `json:"rsaPrivateKey,omitempty"` RSAPublicKey string `json:"rsaPublicKey,omitempty"` NodeKey string `json:"nodeKey,omitempty"` NodeID string `json:"nodeID,omitempty"` // contains filtered or unexported fields }
a target is a recipe configured to be launched in a public cloud region
func NewTarget ¶
func NewTarget( r cookbook.Recipe, p provider.CloudProvider, b backend.CloudBackend, ) *Target
func (*Target) CanUseAsEgressNode ¶
func (*Target) CreateDeviceConnectKeyPair ¶
func (*Target) Dependencies ¶
func (*Target) DeploymentName ¶
func (*Target) Description ¶
func (*Target) GetApiCARoot ¶
func (*Target) GetEndpoint ¶
func (*Target) GetLastSeen ¶
func (*Target) GetPublicKey ¶
func (*Target) GetSpaceID ¶
func (*Target) GetSpaceName ¶
func (*Target) GetVersion ¶
func (*Target) HasAdminAccess ¶
func (*Target) HasDependents ¶
func (*Target) IsSpaceOwned ¶
func (*Target) ManagedInstance ¶
func (t *Target) ManagedInstance(name string) *ManagedInstance
func (*Target) ManagedInstances ¶
func (t *Target) ManagedInstances() []*ManagedInstance
func (*Target) NewBuilder ¶
func (t *Target) NewBuilder( buildVars map[string]string, outputBuffer, errorBuffer io.Writer, ) (*Builder, error)
returns a launcher for this target
func (*Target) RestApiClient ¶
func (*Target) Resume ¶
func (t *Target) Resume(cb InstanceStateChange) error
func (*Target) Status ¶
func (t *Target) Status() TargetState
func (*Target) Suspend ¶
func (t *Target) Suspend(cb InstanceStateChange) error
func (*Target) UpdateKeys ¶
type TargetSet ¶
type TargetSet struct {
// contains filtered or unexported fields
}
func NewTargetSet ¶
func NewTargetSet(ctx context) *TargetSet
func (*TargetSet) DeleteTarget ¶
func (*TargetSet) GetDisabledTargetRecipes ¶
func (ts *TargetSet) GetDisabledTargetRecipes() []cookbook.CookbookRecipeInfo
func (*TargetSet) GetTargets ¶
func (*TargetSet) MarshalJSON ¶
func (*TargetSet) UnmarshalJSON ¶
type TargetState ¶
type TargetState int
Input types
const ( Undeployed TargetState = iota Running Shutdown Pending Unknown )