drivers

package
v0.0.0-...-61a2cff Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Applier

type Applier struct{}

func (*Applier) ReconcileDisks

func (a *Applier) ReconcileDisks(infra *v1.Infra, current *v1.Hosts, des []v1.Disk, driver Driver) error

func (*Applier) ReconcileHosts

func (a *Applier) ReconcileHosts(current []v1.Hosts, infra *v1.Infra, driver Driver) error

func (*Applier) ReconcileInstance

func (a *Applier) ReconcileInstance(infra *v1.Infra, driver Driver) error

type Driver

type Driver interface {
	CreateInstances(hosts *v1.Hosts, infra *v1.Infra) error
	DeleteInstances(hosts *v1.Hosts) error
	StopInstances(hosts *v1.Hosts) error
	ModifyInstances(curHosts *v1.Hosts, desHosts *v1.Hosts) error
	DeleteInstanceByID(_ string, _ *v1.Infra) error
	GetInstancesByLabel(key string, value string, infra *v1.Infra) (*v1.Hosts, error)
	// get infra all current hosts
	GetInstances(infra *v1.Infra, status string) ([]v1.Hosts, error)
	// Volumes operation
	// Create and Attach
	CreateVolumes(infra *v1.Infra, host *v1.Hosts, disks []v1.Disk) error
	// Delete and Detach
	DeleteVolume(disks []string) error
	// Modify
	ModifyVolume(curDisk *v1.Disk, desDisk *v1.Disk) error
	CreateKeyPair(infra *v1.Infra) error
	DeleteKeyPair(infra *v1.Infra) error
	DeleteInfra(infra *v1.Infra) error
}

func NewAWSDriver

func NewAWSDriver() (Driver, error)

func NewAliyunDriver

func NewAliyunDriver() (Driver, error)

func NewDriver

func NewDriver(platform string) (Driver, error)

type Reconcile

type Reconcile interface {
	ReconcileInstance(infra *v1.Infra, driver Driver) error
}

func NewApplier

func NewApplier() Reconcile

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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