client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DefaultServerAddress amplifier address + port default
	DefaultServerAddress = "localhost:50101"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AMP

type AMP struct {
	// Config contains all the configuration settings that were loaded
	Configuration *Configuration
	Conn          *grpc.ClientConn
}

AMP holds the state for the current environment

func NewAMP

func NewAMP(c *Configuration) *AMP

NewAMP creates a new AMP instance

func (*AMP) Connect

func (a *AMP) Connect() *grpc.ClientConn

Connect to amplifier

func (*AMP) Create

func (a *AMP) Create()

Create a new swarm

func (*AMP) Disconnect

func (a *AMP) Disconnect()

Disconnect from amplifier

func (*AMP) GetAuthorizedContext

func (a *AMP) GetAuthorizedContext() (ctx context.Context, err error)

GetAuthorizedContext returns an authorized context

func (*AMP) GithubOauth

func (a *AMP) GithubOauth(username, password, otp string) (lastEight, name string, err error)

GithubOauth does an rpc call to login via github

func (*AMP) Start

func (a *AMP) Start()

Start the swarm

func (*AMP) Status

func (a *AMP) Status()

Status returns the current status

func (*AMP) Stop

func (a *AMP) Stop()

Stop the swarm

func (*AMP) Update

func (a *AMP) Update()

Update the swarm

func (*AMP) Verbose

func (a *AMP) Verbose() bool

Verbose returns true if verbose flag is set

type Configuration

type Configuration struct {
	Verbose       bool
	Github        string
	Target        string
	Images        []string
	Port          string
	ServerAddress string
}

Configuration is for all configurable client settings

Jump to

Keyboard shortcuts

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