computes

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service holds a collection of interfaces.

func NewService

func NewService(ctx context.Context, scope *scope.ClusterScope) *Service

NewService returns a new service given the digitalocean api client.

func (*Service) CreateDroplet

func (s *Service) CreateDroplet(scope *scope.MachineScope) (*godo.Droplet, error)

CreateDroplet create a droplet instance.

func (*Service) CreateVolume added in v0.4.2

func (s *Service) CreateVolume(disk infrav1.DataDisk, volName string) (*godo.Volume, error)

CreateVolume creates a block storage volume.

func (*Service) DeleteDroplet

func (s *Service) DeleteDroplet(id string) error

DeleteDroplet delete a droplet instance. Returns nil on success, error in all other cases.

func (*Service) DeleteVolume added in v0.4.2

func (s *Service) DeleteVolume(id string) error

DeleteVolume deletes a block storage volume.

func (*Service) GetDroplet

func (s *Service) GetDroplet(id string) (*godo.Droplet, error)

GetDroplet get a droplet instance.

func (*Service) GetDropletAddress

func (s *Service) GetDropletAddress(droplet *godo.Droplet) ([]corev1.NodeAddress, error)

GetDropletAddress convert droplet IPs to corev1.NodeAddresses.

func (*Service) GetImageID added in v0.4.2

func (s *Service) GetImageID(imageSpec intstr.IntOrString) (int, error)

func (*Service) GetSSHKey

func (s *Service) GetSSHKey(sshkey intstr.IntOrString) (*godo.Key, error)

func (*Service) GetVolumeByName added in v0.4.2

func (s *Service) GetVolumeByName(name string) (*godo.Volume, error)

GetVolumeByName takes a volume name and returns a Volume if found.

Jump to

Keyboard shortcuts

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