cmdclient

package
v0.30.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 26 Imported by: 23

Documentation

Index

Constants

View Source
const StandardLauncherSocketFileName = "launcher-sock"
View Source
const StandardLauncherUnresponsiveFileName = "launcher-unresponsive"

Variables

This section is empty.

Functions

func FindSocketOnHost added in v0.29.0

func FindSocketOnHost(vmi *v1.VirtualMachineInstance) (string, error)

gets the cmd socket for a VMI

func IsDisconnected

func IsDisconnected(err error) bool

func IsLegacySocket added in v0.29.0

func IsLegacySocket(socket string) bool

func IsSocketUnresponsive added in v0.29.0

func IsSocketUnresponsive(socket string) bool

func LegacySocketsDirectory added in v0.29.0

func LegacySocketsDirectory() string

func ListAllSockets

func ListAllSockets() ([]string, error)

func MarkSocketUnresponsive added in v0.29.0

func MarkSocketUnresponsive(socket string) error

func SetLegacyBaseDir added in v0.29.0

func SetLegacyBaseDir(baseDir string)

func SetPodsBaseDir added in v0.29.0

func SetPodsBaseDir(baseDir string)

func SocketDirectoryOnHost added in v0.29.0

func SocketDirectoryOnHost(podUID string) string

func SocketFilePathOnHost added in v0.29.0

func SocketFilePathOnHost(podUID string) string

func SocketMonitoringEnabled added in v0.29.0

func SocketMonitoringEnabled(socket string) bool

func SocketOnGuest added in v0.29.0

func SocketOnGuest() string

Types

type LauncherClient

type LauncherClient interface {
	SyncVirtualMachine(vmi *v1.VirtualMachineInstance, options *cmdv1.VirtualMachineOptions) error
	PauseVirtualMachine(vmi *v1.VirtualMachineInstance) error
	UnpauseVirtualMachine(vmi *v1.VirtualMachineInstance) error
	SyncMigrationTarget(vmi *v1.VirtualMachineInstance) error
	ShutdownVirtualMachine(vmi *v1.VirtualMachineInstance) error
	KillVirtualMachine(vmi *v1.VirtualMachineInstance) error
	MigrateVirtualMachine(vmi *v1.VirtualMachineInstance, options *MigrationOptions) error
	CancelVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error
	SetVirtualMachineGuestTime(vmi *v1.VirtualMachineInstance) error
	DeleteDomain(vmi *v1.VirtualMachineInstance) error
	GetDomain() (*api.Domain, bool, error)
	GetDomainStats() (*stats.DomainStats, bool, error)
	GetGuestInfo() (*v1.VirtualMachineInstanceGuestAgentInfo, error)
	GetUsers() (v1.VirtualMachineInstanceGuestOSUserList, error)
	GetFilesystems() (v1.VirtualMachineInstanceFileSystemList, error)
	Ping() error
	Close()
}

func NewClient added in v0.17.0

func NewClient(socketPath string) (LauncherClient, error)

func NewClientWithInfoClient added in v0.17.0

func NewClientWithInfoClient(infoClient info.CmdInfoClient, conn *grpc.ClientConn) (LauncherClient, error)

type MigrationOptions added in v0.16.0

type MigrationOptions struct {
	Bandwidth               resource.Quantity
	ProgressTimeout         int64
	CompletionTimeoutPerGiB int64
	UnsafeMigration         bool
	AllowAutoConverge       bool
}

type MockLauncherClient

type MockLauncherClient struct {
	// contains filtered or unexported fields
}

Mock of LauncherClient interface

func NewMockLauncherClient

func NewMockLauncherClient(ctrl *gomock.Controller) *MockLauncherClient

func (*MockLauncherClient) CancelVirtualMachineMigration added in v0.16.0

func (_m *MockLauncherClient) CancelVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) Close

func (_m *MockLauncherClient) Close()

func (*MockLauncherClient) DeleteDomain added in v0.8.0

func (_m *MockLauncherClient) DeleteDomain(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) EXPECT

func (_m *MockLauncherClient) EXPECT() *_MockLauncherClientRecorder

func (*MockLauncherClient) GetDomain

func (_m *MockLauncherClient) GetDomain() (*api.Domain, bool, error)

func (*MockLauncherClient) GetDomainStats added in v0.15.0

func (_m *MockLauncherClient) GetDomainStats() (*stats.DomainStats, bool, error)

func (*MockLauncherClient) GetFilesystems added in v0.28.0

func (*MockLauncherClient) GetGuestInfo added in v0.27.0

func (*MockLauncherClient) GetUsers added in v0.28.0

func (*MockLauncherClient) KillVirtualMachine

func (_m *MockLauncherClient) KillVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) MigrateVirtualMachine added in v0.9.2

func (_m *MockLauncherClient) MigrateVirtualMachine(vmi *v1.VirtualMachineInstance, options *MigrationOptions) error

func (*MockLauncherClient) PauseVirtualMachine added in v0.24.0

func (_m *MockLauncherClient) PauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) Ping

func (_m *MockLauncherClient) Ping() error

func (*MockLauncherClient) SetVirtualMachineGuestTime added in v0.29.0

func (_m *MockLauncherClient) SetVirtualMachineGuestTime(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) ShutdownVirtualMachine

func (_m *MockLauncherClient) ShutdownVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) SyncMigrationTarget added in v0.9.2

func (_m *MockLauncherClient) SyncMigrationTarget(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) SyncVirtualMachine

func (_m *MockLauncherClient) SyncVirtualMachine(vmi *v1.VirtualMachineInstance, options *v10.VirtualMachineOptions) error

func (*MockLauncherClient) UnpauseVirtualMachine added in v0.24.0

func (_m *MockLauncherClient) UnpauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

type VirtLauncherClient

type VirtLauncherClient struct {
	// contains filtered or unexported fields
}

func (*VirtLauncherClient) CancelVirtualMachineMigration added in v0.16.0

func (c *VirtLauncherClient) CancelVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) Close

func (c *VirtLauncherClient) Close()

func (*VirtLauncherClient) DeleteDomain added in v0.8.0

func (c *VirtLauncherClient) DeleteDomain(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) GetDomain

func (c *VirtLauncherClient) GetDomain() (*api.Domain, bool, error)

func (*VirtLauncherClient) GetDomainStats added in v0.15.0

func (c *VirtLauncherClient) GetDomainStats() (*stats.DomainStats, bool, error)

func (*VirtLauncherClient) GetFilesystems added in v0.28.0

GetFilesystems returns the list of active filesystems on the guest machine

func (*VirtLauncherClient) GetGuestInfo added in v0.27.0

GetGuestInfo is a counterpart for virt-launcher call to gather guest agent data

func (*VirtLauncherClient) GetUsers added in v0.28.0

GetUsers returns the list of the active users on the guest machine

func (*VirtLauncherClient) KillVirtualMachine

func (c *VirtLauncherClient) KillVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) MigrateVirtualMachine added in v0.9.2

func (c *VirtLauncherClient) MigrateVirtualMachine(vmi *v1.VirtualMachineInstance, options *MigrationOptions) error

func (*VirtLauncherClient) PauseVirtualMachine added in v0.24.0

func (c *VirtLauncherClient) PauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) Ping

func (c *VirtLauncherClient) Ping() error

func (*VirtLauncherClient) SetVirtualMachineGuestTime added in v0.29.0

func (c *VirtLauncherClient) SetVirtualMachineGuestTime(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) ShutdownVirtualMachine

func (c *VirtLauncherClient) ShutdownVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) SyncMigrationTarget added in v0.9.2

func (c *VirtLauncherClient) SyncMigrationTarget(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) SyncVirtualMachine

func (c *VirtLauncherClient) SyncVirtualMachine(vmi *v1.VirtualMachineInstance, options *cmdv1.VirtualMachineOptions) error

func (*VirtLauncherClient) UnpauseVirtualMachine added in v0.24.0

func (c *VirtLauncherClient) UnpauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

Jump to

Keyboard shortcuts

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