 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func ValidateHostName(name string) bool
- func WaitForSSH(h *Host) error
- type CertPathInfo
- 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) IsActive(host *Host) (bool, error)
- func (s Filestore) List() ([]*Host, error)
- func (s Filestore) Remove(name string, force bool) error
- func (s Filestore) RemoveActive() error
- func (s Filestore) Save(host *Host) error
- func (s Filestore) SetActive(host *Host) error
 
- type Host
- func (h *Host) ConfigureAuth() error
- func (h *Host) Create(name string) error
- func (h *Host) GetSSHCommand(args ...string) (*exec.Cmd, error)
- func (h *Host) GetURL() (string, error)
- func (h *Host) Kill() error
- func (h *Host) LoadConfig() error
- func (h *Host) MachineInState(desiredState state.State) func() bool
- func (h *Host) Remove(force bool) error
- func (h *Host) Restart() error
- func (h *Host) SaveConfig() error
- func (h *Host) Start() error
- func (h *Host) Stop() error
- func (h *Host) Upgrade() error
 
- type HostMetadata
- type HostOptions
- type Machine
- func (m *Machine) Create(name string, driverName string, hostOptions *HostOptions, ...) (*Host, error)
- func (m *Machine) Exists(name string) (bool, error)
- func (m *Machine) Get(name string) (*Host, error)
- func (m *Machine) GetActive() (*Host, error)
- func (m *Machine) IsActive(host *Host) (bool, error)
- func (m *Machine) List() ([]*Host, error)
- func (m *Machine) Remove(name string, force bool) error
- func (m *Machine) RemoveActive() error
- func (m *Machine) SetActive(host *Host) error
 
- type Store
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ValidateHostName ¶
func WaitForSSH ¶
Types ¶
type CertPathInfo ¶
type Filestore ¶
type Filestore struct {
	// contains filtered or unexported fields
}
    func (Filestore) GetCACertificatePath ¶
func (Filestore) GetPrivateKeyPath ¶
func (Filestore) RemoveActive ¶
type Host ¶
type Host struct {
	Name        string `json:"-"`
	DriverName  string
	Driver      drivers.Driver
	StorePath   string
	HostOptions *HostOptions
	// deprecated options; these are left to assist in config migrations
	SwarmHost      string
	SwarmMaster    bool
	SwarmDiscovery string
	CaCertPath     string
	PrivateKeyPath string
	ServerCertPath string
	ServerKeyPath  string
	ClientCertPath string
	ClientKeyPath  string
}
    func FillNestedHost ¶
validates host config and modifies if needed this is used for configuration updates
func (*Host) ConfigureAuth ¶
func (*Host) LoadConfig ¶
func (*Host) SaveConfig ¶
type HostMetadata ¶
type HostMetadata struct {
	DriverName     string
	HostOptions    HostOptions
	StorePath      string
	CaCertPath     string
	PrivateKeyPath string
	ServerCertPath string
	ServerKeyPath  string
	ClientCertPath string
}
    func FillNestedHostMetadata ¶
func FillNestedHostMetadata(m *HostMetadata) *HostMetadata
fills nested host metadata and modifies if needed this is used for configuration updates
type HostOptions ¶
type HostOptions struct {
	Driver        string
	Memory        int
	Disk          int
	EngineOptions *engine.EngineOptions
	SwarmOptions  *swarm.SwarmOptions
	AuthOptions   *auth.AuthOptions
}
    type Machine ¶
type Machine struct {
	// contains filtered or unexported fields
}
    func (*Machine) Create ¶
func (m *Machine) Create(name string, driverName string, hostOptions *HostOptions, driverConfig drivers.DriverOptions) (*Host, error)
func (*Machine) RemoveActive ¶
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)
	// IsActive returns whether the host is active or not
	IsActive(host *Host) (bool, 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
	// RemoveActive removes the active machine from the store
	RemoveActive() error
	// Save persists a machine in the store
	Save(host *Host) error
	// SetActive sets the specified host as the active host
	SetActive(host *Host) error
}
    
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.