Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type AllProxyGetter
- type BOSHCLI
- type BOSHVersionError
- type CIDRBlock
- type CLI
- type Client
- type ClientProvider
- func (c ClientProvider) BoshCLI(jumpbox storage.Jumpbox, stderr io.Writer, ...) (RuntimeConfigUpdater, error)
- func (c ClientProvider) Client(jumpbox storage.Jumpbox, ...) (ConfigUpdater, error)
- func (c ClientProvider) Dialer(jumpbox storage.Jumpbox) (proxy.Dialer, error)
- func (ClientProvider) HTTPClient(dialer proxy.Dialer, directorCACert []byte) *http.Client
- type ConfigRequestBody
- type ConfigUpdater
- type CredhubGetter
- type DirInput
- type Executor
- func (e Executor) CreateEnv(input DirInput, state storage.State) (string, error)
- func (e Executor) DeleteEnv(input DirInput, state storage.State) error
- func (e Executor) Path() string
- func (e Executor) PlanDirector(input DirInput, deploymentDir, iaas string) error
- func (e Executor) PlanJumpbox(input DirInput, deploymentDir, iaas string) error
- func (e Executor) Version() (string, error)
- func (e Executor) WriteDeploymentVars(input DirInput, deploymentVars string) error
- type IP
- type Info
- type Manager
- func (m *Manager) CreateDirector(state storage.State, terraformOutputs terraform.Outputs) (storage.State, error)
- func (m *Manager) CreateJumpbox(state storage.State, terraformOutputs terraform.Outputs) (storage.State, error)
- func (m *Manager) DeleteDirector(state storage.State, terraformOutputs terraform.Outputs) error
- func (m *Manager) DeleteJumpbox(state storage.State, terraformOutputs terraform.Outputs) error
- func (m *Manager) GetDirectorDeploymentVars(state storage.State, terraformOutputs terraform.Outputs) string
- func (m *Manager) GetJumpboxDeploymentVars(state storage.State, terraformOutputs terraform.Outputs) string
- func (m *Manager) InitializeDirector(state storage.State) error
- func (m *Manager) InitializeJumpbox(state storage.State) error
- func (m *Manager) Path() string
- func (m *Manager) Version() (string, error)
- type ManagerCreateError
- type ManagerDeleteError
- type RuntimeConfigUpdater
- type SSHKeyDeleter
- type SSHKeyGetter
Constants ¶
const AWSBoshDirectorEphemeralIPOps = `
- type: replace
path: /resource_pools/name=vms/cloud_properties/auto_assign_public_ip?
value: true
`
const GCPBoshDirectorEphemeralIPOps = `
- type: replace
path: /networks/name=default/subnets/0/cloud_properties/ephemeral_external_ip?
value: true
`
const VSphereJumpboxNetworkOps = `---
- type: remove
path: /instance_groups/name=jumpbox/networks/name=public
`
Variables ¶
var ( MAX_RETRIES = 5 RETRY_DELAY = 10 * time.Second )
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type AllProxyGetter ¶
type AllProxyGetter struct {
// contains filtered or unexported fields
}
func NewAllProxyGetter ¶
func NewAllProxyGetter(sshKeyGetter sshKeyGetter, fs allProxyFs) AllProxyGetter
func (AllProxyGetter) BoshAllProxy ¶
func (a AllProxyGetter) BoshAllProxy(jumpboxURL, privateKeyPath string) string
func (AllProxyGetter) GeneratePrivateKey ¶
func (a AllProxyGetter) GeneratePrivateKey() (string, error)
type BOSHVersionError ¶
type BOSHVersionError struct {
// contains filtered or unexported fields
}
func NewBOSHVersionError ¶
func NewBOSHVersionError(err error) BOSHVersionError
func (BOSHVersionError) Error ¶
func (b BOSHVersionError) Error() string
type CIDRBlock ¶
type CIDRBlock struct { CIDRSize int // contains filtered or unexported fields }
func ParseCIDRBlock ¶
func (CIDRBlock) GetFirstIP ¶
type Client ¶
type Client struct { DirectorAddress string UAAAddress string // contains filtered or unexported fields }
func (Client) UpdateCloudConfig ¶
type ClientProvider ¶
type ClientProvider struct {
// contains filtered or unexported fields
}
func NewClientProvider ¶
func NewClientProvider(allProxyGetter allProxyGetter, socks5Proxy socks5Proxy, sshKeyGetter sshKeyGetter, boshCLIPath string) ClientProvider
func (ClientProvider) BoshCLI ¶
func (c ClientProvider) BoshCLI(jumpbox storage.Jumpbox, stderr io.Writer, directorAddress, directorUsername, directorPassword, directorCACert string) (RuntimeConfigUpdater, error)
func (ClientProvider) Client ¶
func (c ClientProvider) Client(jumpbox storage.Jumpbox, directorAddress, directorUsername, directorPassword, directorCACert string) (ConfigUpdater, error)
func (ClientProvider) HTTPClient ¶
type ConfigRequestBody ¶
type ConfigUpdater ¶
type CredhubGetter ¶
type CredhubGetter struct {
// contains filtered or unexported fields
}
func NewCredhubGetter ¶
func NewCredhubGetter(stateStore stateStore, fileIO fileio.FileReader) CredhubGetter
func (CredhubGetter) GetCerts ¶
func (c CredhubGetter) GetCerts() (string, error)
func (CredhubGetter) GetPassword ¶
func (c CredhubGetter) GetPassword() (string, error)
func (CredhubGetter) GetServer ¶
func (c CredhubGetter) GetServer() (string, error)
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(cmd cli, fs executorFs) Executor
func (Executor) PlanDirector ¶
func (Executor) PlanJumpbox ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(executor executor, logger logger, stateStore stateStore, sshKeyGetter sshKeyGetter, fs deleterFs) *Manager
func (*Manager) CreateDirector ¶
func (*Manager) CreateJumpbox ¶
func (*Manager) DeleteDirector ¶
func (*Manager) DeleteJumpbox ¶
func (*Manager) GetDirectorDeploymentVars ¶
func (*Manager) GetJumpboxDeploymentVars ¶
func (*Manager) InitializeDirector ¶
type ManagerCreateError ¶
type ManagerCreateError struct {
// contains filtered or unexported fields
}
func NewManagerCreateError ¶
func NewManagerCreateError(state storage.State, err error) ManagerCreateError
func (ManagerCreateError) Error ¶
func (b ManagerCreateError) Error() string
func (ManagerCreateError) State ¶
func (b ManagerCreateError) State() storage.State
type ManagerDeleteError ¶
type ManagerDeleteError struct {
// contains filtered or unexported fields
}
func NewManagerDeleteError ¶
func NewManagerDeleteError(state storage.State, err error) ManagerDeleteError
func (ManagerDeleteError) Error ¶
func (b ManagerDeleteError) Error() string
func (ManagerDeleteError) State ¶
func (b ManagerDeleteError) State() storage.State
type RuntimeConfigUpdater ¶
type SSHKeyDeleter ¶
type SSHKeyDeleter struct {
// contains filtered or unexported fields
}
func NewSSHKeyDeleter ¶
func NewSSHKeyDeleter(stateStore stateStore, fs deleterFs) SSHKeyDeleter
func (SSHKeyDeleter) Delete ¶
func (s SSHKeyDeleter) Delete() error
type SSHKeyGetter ¶
type SSHKeyGetter struct {
// contains filtered or unexported fields
}
func NewSSHKeyGetter ¶
func NewSSHKeyGetter(stateStore stateStore, fReader fileio.FileReader) SSHKeyGetter