Documentation ¶
Index ¶
- Variables
- func ValidateHostName(name string) bool
- func WaitForSSH(h *Host) error
- type CertPathInfo
- type ErrHostDoesNotExist
- type ErrSavingConfig
- type Filestore
- func (s Filestore) Exists(name string) (bool, error)
- func (s Filestore) Get(name string) (*Host, error)
- func (s Filestore) GetActive() (*Host, error)
- func (s Filestore) GetCACertificatePath() (string, error)
- func (s Filestore) GetPath() string
- func (s Filestore) GetPrivateKeyPath() (string, error)
- func (s Filestore) List() ([]*Host, error)
- func (s Filestore) Remove(name string, force bool) error
- func (s Filestore) Save(host *Host) error
- type Host
- func (h *Host) ConfigureAuth() error
- func (h *Host) Create(name string) error
- func (h *Host) CreateSSHClient() (ssh.Client, error)
- func (h *Host) CreateSSHShell() error
- func (h *Host) GetURL() (string, error)
- func (h *Host) Kill() error
- func (h *Host) LoadConfig() error
- func (h *Host) PrintIP() error
- func (h *Host) Remove(force bool) error
- func (h *Host) Restart() error
- func (h *Host) RunSSHCommand(command string) (string, error)
- func (h *Host) SaveConfig() error
- func (h *Host) Start() error
- func (h *Host) Stop() error
- func (h *Host) Upgrade() error
- type HostListItem
- type HostMetadata
- type HostMetadataV0
- type HostOptions
- type HostV0
- type Provider
- func (provider *Provider) Create(name string, driverName string, hostOptions *HostOptions, ...) (*Host, error)
- func (provider *Provider) Exists(name string) (bool, error)
- func (provider *Provider) Get(name string) (*Host, error)
- func (provider *Provider) GetActive() (*Host, error)
- func (provider *Provider) List() ([]*Host, error)
- func (provider *Provider) Remove(name string, force bool) error
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHostname = errors.New("Invalid hostname specified") ErrUnknownProviderType = errors.New("Unknown hypervisor type") )
Functions ¶
func ValidateHostName ¶
func WaitForSSH ¶
Types ¶
type CertPathInfo ¶
type ErrHostDoesNotExist ¶
type ErrHostDoesNotExist struct {
Name string
}
func (ErrHostDoesNotExist) Error ¶ added in v0.3.0
func (e ErrHostDoesNotExist) Error() string
type ErrSavingConfig ¶ added in v0.4.0
type ErrSavingConfig struct {
// contains filtered or unexported fields
}
func (ErrSavingConfig) Error ¶ added in v0.4.0
func (e ErrSavingConfig) Error() string
type Filestore ¶
type Filestore struct {
// contains filtered or unexported fields
}
func (Filestore) GetCACertificatePath ¶
func (Filestore) GetPrivateKeyPath ¶
type Host ¶
type Host struct { ConfigVersion int Driver drivers.Driver DriverName string HostOptions *HostOptions Name string `json:"-"` StorePath string }
func MigrateHostV0ToHostV1 ¶ added in v0.4.0
validates host config and modifies if needed this is used for configuration updates
func (*Host) ConfigureAuth ¶
func (*Host) CreateSSHShell ¶ added in v0.3.0
func (*Host) LoadConfig ¶
func (*Host) RunSSHCommand ¶ added in v0.3.0
func (*Host) SaveConfig ¶
type HostListItem ¶ added in v0.3.0
type HostListItem struct { Name string Active bool DriverName string State state.State URL string SwarmOptions swarm.SwarmOptions }
func GetHostListItems ¶ added in v0.3.0
func GetHostListItems(hostList []*Host) []HostListItem
type HostMetadata ¶
type HostMetadata struct { ConfigVersion int DriverName string HostOptions HostOptions }
func MigrateHostMetadataV0ToHostMetadataV1 ¶ added in v0.4.0
func MigrateHostMetadataV0ToHostMetadataV1(m *HostMetadataV0) *HostMetadata
fills nested host metadata and modifies if needed this is used for configuration updates
type HostMetadataV0 ¶ added in v0.4.0
type HostOptions ¶
type HostOptions struct { Driver string Memory int Disk int EngineOptions *engine.EngineOptions SwarmOptions *swarm.SwarmOptions AuthOptions *auth.AuthOptions }
type HostV0 ¶ added in v0.4.0
type HostV0 struct { Name string `json:"-"` Driver drivers.Driver DriverName string ConfigVersion int HostOptions *HostOptions StorePath string CaCertPath string PrivateKeyPath string ServerCertPath string ServerKeyPath string ClientCertPath string SwarmHost string SwarmMaster bool SwarmDiscovery string ClientKeyPath string }
type Provider ¶ added in v0.3.1
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) Create ¶ added in v0.3.1
func (provider *Provider) Create(name string, driverName string, hostOptions *HostOptions, driverConfig drivers.DriverOptions) (*Host, error)
type Store ¶
type Store interface { // Exists returns whether a machine exists or not Exists(name string) (bool, error) // GetActive returns the active host GetActive() (*Host, error) // GetPath returns the path to the store GetPath() string // GetCACertPath returns the CA certificate GetCACertificatePath() (string, error) // GetPrivateKeyPath returns the private key GetPrivateKeyPath() (string, error) // List returns a list of hosts List() ([]*Host, error) // Load loads a host by name Get(name string) (*Host, error) // Remove removes a machine from the store Remove(name string, force bool) error // Save persists a machine in the store Save(host *Host) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.