host

package
v0.0.0-...-a50f796 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetSSHClientCreator

func SetSSHClientCreator(creator SSHClientCreator)

func ValidateHostName

func ValidateHostName(name string) bool

Types

type Host

type Host struct {
	ConfigVersion int
	Driver        drivers.Driver
	DriverName    string
	HostOptions   *Options
	Name          string
	RawDriver     []byte `json:"-"`
}

func MigrateHost

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

func (*Host) AuthOptions

func (h *Host) AuthOptions() *auth.Options

func (*Host) ConfigureAllAuth

func (h *Host) ConfigureAllAuth() error

func (*Host) ConfigureAuth

func (h *Host) ConfigureAuth() error

func (*Host) CreateExternalRootSSHClient

func (h *Host) CreateExternalRootSSHClient() (*ssh.ExternalClient, error)

func (*Host) CreateExternalSSHClient

func (h *Host) CreateExternalSSHClient() (*ssh.ExternalClient, error)

func (*Host) CreateSSHClient

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

func (*Host) Kill

func (h *Host) Kill() 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) URL

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

func (*Host) Upgrade

func (h *Host) Upgrade() error

func (*Host) WaitForPodman

func (h *Host) WaitForPodman() error

type Metadata

type Metadata struct {
	ConfigVersion int
	DriverName    string
	HostOptions   Options
}

type Options

type Options struct {
	Driver        string
	Memory        int
	Disk          int
	EngineOptions *engine.Options
	AuthOptions   *auth.Options
}

type RawDataDriver

type RawDataDriver struct {
	*none.Driver
	Data []byte // passed directly back when invoking json.Marshal on this type
}

func (*RawDataDriver) MarshalJSON

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

func (*RawDataDriver) UnmarshalJSON

func (r *RawDataDriver) UnmarshalJSON(data []byte) error

type SSHClientCreator

type SSHClientCreator interface {
	CreateSSHClient(d drivers.Driver) (ssh.Client, error)
	CreateExternalSSHClient(d drivers.Driver) (*ssh.ExternalClient, error)
	CreateExternalRootSSHClient(d drivers.Driver) (*ssh.ExternalClient, error)
}

type StandardSSHClientCreator

type StandardSSHClientCreator struct {
	drivers.Driver
}

func (*StandardSSHClientCreator) CreateExternalRootSSHClient

func (creator *StandardSSHClientCreator) CreateExternalRootSSHClient(d drivers.Driver) (*ssh.ExternalClient, error)

func (*StandardSSHClientCreator) CreateExternalSSHClient

func (creator *StandardSSHClientCreator) CreateExternalSSHClient(d drivers.Driver) (*ssh.ExternalClient, error)

func (*StandardSSHClientCreator) CreateSSHClient

func (creator *StandardSSHClientCreator) CreateSSHClient(d drivers.Driver) (ssh.Client, error)

Jump to

Keyboard shortcuts

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