Help us shape the future of Go! Take the 2026 Go Developer Survey

digitalocean

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListResources

func ListResources(cloud *Cloud, clusterName string) (map[string]*resources.Resource, error)

Types

type Cloud

type Cloud struct {
	Client *godo.Client

	Region string
	// contains filtered or unexported fields
}

Cloud exposes all the interfaces required to operate on DigitalOcean resources

func NewCloud

func NewCloud(region string) (*Cloud, error)

NewCloud returns a Cloud, expecting the env var DIGITALOCEAN_ACCESS_TOKEN NewCloud will return an err if DIGITALOCEAN_ACCESS_TOKEN is not defined

func (*Cloud) DNS

func (c *Cloud) DNS() (dnsprovider.Interface, error)

DNS returns a DO implementation for dnsprovider.Interface

func (*Cloud) DeleteGroup

func (c *Cloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error

DeleteGroup is not implemented yet, is a func that needs to delete a DO instance group.

func (*Cloud) DeleteInstance

func (c *Cloud) DeleteInstance(i *cloudinstances.CloudInstanceGroupMember) error

DeleteInstance is not implemented yet, is func needs to delete a DO instance.

func (*Cloud) Droplets

func (c *Cloud) Droplets() godo.DropletsService

func (*Cloud) FindVPCInfo

func (c *Cloud) FindVPCInfo(id string) (*fi.VPCInfo, error)

FindVPCInfo is not implemented, it's only here to satisfy the fi.Cloud interface

func (*Cloud) GetCloudGroups

func (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error)

GetCloudGroups is not implemented yet, that needs to return the instances and groups that back a kops cluster.

func (*Cloud) ProviderID

func (c *Cloud) ProviderID() kops.CloudProviderID

ProviderID returns the kops api identifier for DigitalOcean cloud provider

func (*Cloud) VolumeActions

func (c *Cloud) VolumeActions() godo.StorageActionsService

VolumeActions returns an implementation of godo.StorageActionsService

func (*Cloud) Volumes

func (c *Cloud) Volumes() godo.StorageService

Volumes returns an implementation of godo.StorageService

type TokenSource

type TokenSource struct {
	AccessToken string
}

TokenSource implements oauth2.TokenSource

func (*TokenSource) Token

func (t *TokenSource) Token() (*oauth2.Token, error)

Token() returns oauth2.Token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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