infraclient

package
v0.0.0-...-f4df126 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalDriver

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

ExternalDriver structure mediates the communication with the machine-controller-manager

func NewExternalDriver

func NewExternalDriver(serverAddr string, options []grpc.DialOption, provider ExternalDriverProvider, machineClassType *metav1.TypeMeta) *ExternalDriver

NewExternalDriver creates a new Driver instance.

func (*ExternalDriver) GetMachineClass

func (d *ExternalDriver) GetMachineClass(machineClassMeta *MachineClassMeta) (interface{}, error)

GetMachineClass contacts the grpc server to get the machine class.

func (*ExternalDriver) GetSecret

func (d *ExternalDriver) GetSecret(secretMeta *SecretMeta) (string, error)

GetSecret contacts the grpc server to get the secret

func (*ExternalDriver) Start

func (d *ExternalDriver) Start() error

Start calls internal function to start external driver

func (*ExternalDriver) StartDriver

func (d *ExternalDriver) StartDriver() error

StartDriver starts the external driver.

func (*ExternalDriver) Stop

func (d *ExternalDriver) Stop() error

Stop stops the external driver.

type ExternalDriverProvider

type ExternalDriverProvider interface {
	Create(machineclass *MachineClassMeta, credentials, machineID, machineName string) (string, string, error)
	Delete(machineclass *MachineClassMeta, credentials, machineID string) error
	List(machineclass *MachineClassMeta, credentials, machineID string) (map[string]string, error)
}

ExternalDriverProvider interface must be implemented by the providers.

type MachineClassDataProvider

type MachineClassDataProvider interface {
	GetMachineClass(machineClassMeta *MachineClassMeta) (interface{}, error)
	GetSecret(SecretMeta *SecretMeta) (string, error)
}

MachineClassDataProvider is the interface an ExternalDriverProvider implementation can use to access machine class data.

type MachineClassMeta

type MachineClassMeta struct {
	Name     string
	Revision int32
}

MachineClassMeta has metadata about the machine class.

type SecretMeta

type SecretMeta struct {
	SecretName      string
	SecretNameSpace string
	Revision        int32
}

SecretMeta has metadata about the machine class.

Jump to

Keyboard shortcuts

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