computes

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package computes have all services and interface to work with the DO compute API.

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)

GetImageID gets the image ID for to yuse to bootstrap the cluster.

func (*Service) GetSSHKey

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

GetSSHKey return the public ssh key stored in DO.

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.

Directories

Path Synopsis
Package mock_computes is a generated GoMock package.
Package mock_computes is a generated GoMock package.

Jump to

Keyboard shortcuts

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