host

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2016 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateHostName

func ValidateHostName(name string) bool

Types

type AuthOptionsV1

type AuthOptionsV1 struct {
	StorePath            string
	CaCertPath           string
	CaCertRemotePath     string
	ServerCertPath       string
	ServerKeyPath        string
	ClientKeyPath        string
	ServerCertRemotePath string
	ServerKeyRemotePath  string
	PrivateKeyPath       string
	ClientCertPath       string
}

type Host

type Host struct {
	ConfigVersion int
	Driver        drivers.Driver
	DriverName    string
	HostOptions   *HostOptions
	Name          string
	RawDriver     []byte
}

func MigrateHost

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

func MigrateHostV2ToHostV3

func MigrateHostV2ToHostV3(hostV2 *HostV2, data []byte, storePath string) *Host

func (*Host) ConfigureAuth

func (h *Host) ConfigureAuth() error

func (*Host) CreateSSHClient

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

func (*Host) GetURL

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

func (*Host) Kill

func (h *Host) Kill() 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 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
	PrivateKeyPath 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
	KubernetesOptions *kubernetes.KubernetesOptions
}

type HostOptionsV1

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

type HostV0

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 HostV1

type HostV1 struct {
	ConfigVersion int
	Driver        drivers.Driver
	DriverName    string
	HostOptions   *HostOptionsV1
	Name          string `json:"-"`
	StorePath     string
}

func MigrateHostV0ToHostV1

func MigrateHostV0ToHostV1(hostV0 *HostV0) *HostV1

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

type HostV2

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

func MigrateHostV1ToHostV2

func MigrateHostV1ToHostV2(hostV1 *HostV1) *HostV2

type RawDataDriver

type RawDataDriver struct {
	*none.Driver
	// contains filtered or unexported fields
}

func (*RawDataDriver) MarshalJSON

func (r *RawDataDriver) MarshalJSON() ([]byte, error)

type RawHost

type RawHost struct {
	Driver *json.RawMessage
}

Jump to

Keyboard shortcuts

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