Documentation
¶
Overview ¶
Package computes have all services and interface to work with the DO compute API.
Index ¶
- type Service
- func (s *Service) CreateDroplet(scope *scope.MachineScope) (*godo.Droplet, error)
- func (s *Service) CreateVolume(disk infrav1.DataDisk, volName string) (*godo.Volume, error)
- func (s *Service) DeleteDroplet(id string) error
- func (s *Service) DeleteVolume(id string) error
- func (s *Service) GetDroplet(id string) (*godo.Droplet, error)
- func (s *Service) GetDropletAddress(droplet *godo.Droplet) ([]corev1.NodeAddress, error)
- func (s *Service) GetImageID(imageSpec intstr.IntOrString) (int, error)
- func (s *Service) GetSSHKey(sshkey intstr.IntOrString) (*godo.Key, error)
- func (s *Service) GetVolumeByName(name string) (*godo.Volume, error)
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 ¶
CreateDroplet create a droplet instance.
func (*Service) CreateVolume ¶ added in v0.4.2
CreateVolume creates a block storage volume.
func (*Service) DeleteDroplet ¶
DeleteDroplet delete a droplet instance. Returns nil on success, error in all other cases.
func (*Service) DeleteVolume ¶ added in v0.4.2
DeleteVolume deletes a block storage volume.
func (*Service) GetDroplet ¶
GetDroplet get a droplet instance.
func (*Service) GetDropletAddress ¶
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.
Click to show internal directories.
Click to hide internal directories.