dochaincore

package module
v0.0.0-...-45e3513 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Unlicense Imports: 23 Imported by: 0

README

dochaincore

GoDoc

Chain Core Developer Edition one-click deploy to a DigitalOcean droplet.

Web installer

dochaincore implements a one-click web installer for Chain Core on DigitalOcean. It automatically creates a new droplet and block storage volume.

Chain Core Installer

Command line

dochaincore exposes a simple command-line utility for deploying Chain Core.

go install github.com/jbowens/dochaincore/cmd/...
DIGITALOCEAN_ACCESS_TOKEN=... dochaincore

Prints output like:

Created DigitalOcean droplet 30977065.
Waiting for SSH server to start...
Waiting for Chain Core to start...
Creating a client token...
Chain Core listening at: http://138.68.52.205:1999
Chain Core client token: dochaincore:6de76c428a8ce9805777a60fffed21889240f434e72eef902c49e9822b8a87eb

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClientToken

func CreateClientToken(ctx context.Context, c *Core) (string, error)

CreateClientToken sets up a Chain Core client token for the provided Core.

func Handler

func Handler(oauthClientID, oauthClientSecret, host string) http.Handler

func WaitForHTTP

func WaitForHTTP(ctx context.Context, c *Core) error

WaitForHTTP waits until Chain Core begins listening on port 1999.

func WaitForSSH

func WaitForSSH(ctx context.Context, c *Core) error

WaitForSSH waits until port 22 on the provided Chain Core's host is opened.

Types

type Core

type Core struct {
	DropletID   int
	IPv4Address string
	IPv6Address string
	// contains filtered or unexported fields
}

func Deploy

func Deploy(ctx context.Context, accessToken string, opts ...Option) (*Core, error)

Deploy builds and deploys an instance of Chain Core on a DigitalOcean droplet. It requires a DigitalOcean access token and optionally takes a variadic number of configuration options.

type Option

type Option func(*options)

func DropletName

func DropletName(name string) Option

func DropletRegion

func DropletRegion(region string) Option

func DropletSize

func DropletSize(size string) Option

func VolumeSizeGB

func VolumeSizeGB(gb int64) Option

Directories

Path Synopsis
cmd
dochaincore
Command dochaincore deploys Chain Core Developer Edition to a Digital Ocean droplet.
Command dochaincore deploys Chain Core Developer Edition to a Digital Ocean droplet.

Jump to

Keyboard shortcuts

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