do

package
v0.0.0-...-3442565 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DOVolumes

type DOVolumes struct {
	ClusterName string
	DigiCloud   *DigiCloud
	// contains filtered or unexported fields
}

DOVolumes defines the digital ocean's volume implementation

func NewDOVolumes

func NewDOVolumes(clusterName string, volumeTags []string, nameTag string) (*DOVolumes, error)

ex: nametag - etcdcluster-main OR etcdcluster-events ex: volume tag array - kubernetescluster=mycluster; k8s-index any droplet where this is running will have the tags - k8s-index:1; kubernetescluster:mycluster any volume that is created will have the tags - etcdcluster-main:1 OR etcdcluster-events:1; kubernetescluster:mycluster; k8s-index:1

func (*DOVolumes) AttachVolume

func (a *DOVolumes) AttachVolume(volume *volumes.Volume) error

AttachVolume attaches the specified volume to this instance, returning the mountpoint & nil if successful

func (*DOVolumes) Contains

func (a *DOVolumes) Contains(dotags []string, x string) bool

Contains tells whether dotags contains x.

func (*DOVolumes) FindMountedVolume

func (a *DOVolumes) FindMountedVolume(volume *volumes.Volume) (string, error)

FindMountedVolume implements Volumes::FindMountedVolume

func (*DOVolumes) FindVolumes

func (a *DOVolumes) FindVolumes() ([]*volumes.Volume, error)

func (*DOVolumes) MyIP

func (a *DOVolumes) MyIP() (string, error)

func (*DOVolumes) Poll

func (a *DOVolumes) Poll() (map[string]discovery.Node, error)

type DigiCloud

type DigiCloud struct {
	Client *godo.Client
	Region string
}

DigiCloud exposes all the interfaces required to operate on DigitalOcean resources

func NewCloud

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

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

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

Jump to

Keyboard shortcuts

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