digitalocean

package
v0.0.0-...-f0d86f2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DigitalOcean

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

DigitalOcean is an implementation of CloudProvider for DigitalOcean

func NewDigitalOcean

func NewDigitalOcean() (*DigitalOcean, error)

NewDigitalOcean instantiates a new DigitalOcean CloudProvider

func (DigitalOcean) CreateNode

func (do DigitalOcean) CreateNode(ctx context.Context, node model.Node, callback func(string, string), onError func(error))

CreateNode creates a volume and a droplet and installs geth.

func (DigitalOcean) DeleteNode

func (do DigitalOcean) DeleteNode(ctx context.Context, node model.Node, onSuccess func(), onError func(error))

DeleteNode deletes the droplet and the attached volume and firewall. The firewall is deleted first, because the droplet needs to exists when looking for the firewall. The volume is deleted last, because we can't delete a volume attached to an existing droplet.

type TokenSource

type TokenSource struct {
	AccessToken string
}

TokenSource stores the OAuth2 access token string

func (*TokenSource) Token

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

Token returns the oauth2.Token

Jump to

Keyboard shortcuts

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