host

package
v0.0.0-...-b068303 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2015 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostTestName = "test-host"
)

Variables

This section is empty.

Functions

func GetTestDriverFlags

func GetTestDriverFlags() drivers.DriverOptionsMock

Helper functions for tests meant to exported and used by other packages as well.

func ValidateHostName

func ValidateHostName(name string) bool

func WaitForSSH

func WaitForSSH(h *Host) error

Types

type Host

type Host struct {
	ConfigVersion int
	Driver        drivers.Driver
	DriverName    string
	HostOptions   *HostOptions
	Name          string
}

func GetDefaultTestHost

func GetDefaultTestHost() (*Host, error)

func MigrateHost

func MigrateHost(h *Host, data []byte) (*Host, bool, error)

func MigrateHostV0ToHostV1

func MigrateHostV0ToHostV1(hostV0 *HostV0) *Host

validates host config and modifies if needed this is used for configuration updates

func (*Host) ConfigureAuth

func (h *Host) ConfigureAuth() error

func (*Host) CreateSSHClient

func (h *Host) CreateSSHClient() (ssh.Client, error)

func (*Host) CreateSSHShell

func (h *Host) CreateSSHShell() error

func (*Host) GetURL

func (h *Host) GetURL() (string, error)

func (*Host) IsActive

func (h *Host) IsActive() (bool, error)

IsActive provides a single method for determining if a host is active based on both the url and if the host is stopped.

func (*Host) Kill

func (h *Host) Kill() error

func (*Host) PrintIP

func (h *Host) PrintIP() error

func (*Host) Provision

func (h *Host) Provision() error

func (*Host) Restart

func (h *Host) Restart() error

func (*Host) RunSSHCommand

func (h *Host) RunSSHCommand(command string) (string, error)

func (*Host) Start

func (h *Host) Start() error

func (*Host) Stop

func (h *Host) Stop() error

func (*Host) Upgrade

func (h *Host) Upgrade() error

type HostListItem

type HostListItem struct {
	Name         string
	Active       bool
	DriverName   string
	State        state.State
	URL          string
	SwarmOptions swarm.SwarmOptions
}

func GetHostListItems

func GetHostListItems(hostList []*Host) []HostListItem

type HostMetadata

type HostMetadata struct {
	ConfigVersion int
	DriverName    string
	HostOptions   HostOptions
}

func MigrateHostMetadataV0ToHostMetadataV1

func MigrateHostMetadataV0ToHostMetadataV1(m *HostMetadataV0) *HostMetadata

fills nested host metadata and modifies if needed this is used for configuration updates

type HostMetadataV0

type HostMetadataV0 struct {
	HostOptions   HostOptions
	DriverName    string
	ConfigVersion int

	StorePath        string
	CaCertPath       string
	CaPrivateKeyPath string
	ServerCertPath   string
	ServerKeyPath    string
	ClientCertPath   string
}

type HostOptions

type HostOptions struct {
	Driver        string
	Memory        int
	Disk          int
	EngineOptions *engine.EngineOptions
	SwarmOptions  *swarm.SwarmOptions
	AuthOptions   *auth.AuthOptions
}

type HostV0

type HostV0 struct {
	Name          string `json:"-"`
	Driver        drivers.Driver
	DriverName    string
	ConfigVersion int
	HostOptions   *HostOptions

	StorePath        string
	CaCertPath       string
	CaPrivateKeyPath string
	ServerCertPath   string
	ServerKeyPath    string
	ClientCertPath   string
	SwarmHost        string
	SwarmMaster      bool
	SwarmDiscovery   string
	ClientKeyPath    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL