wharfie

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Debug mode.
	Debug              = false
	DOCKER_API_VERSION = "v1.30"
	DOCKER_API_HOST    = "unix:///var/run/docker.sock"
	DOCKER_CERT_PATH   = "/etc/docker/"
)

Variables

View Source
var (
	DOCKER_VOLUMES = []string{"/home/:/home/"}
)

Functions

func RunExec added in v0.1.0

func RunExec(cmd string)

Types

type Option

type Option func(*Options)

func WithBundleValue added in v0.2.0

func WithBundleValue(d bool) Option

func WithConstraints added in v0.2.0

func WithConstraints(s string) Option

func WithDebugValue

func WithDebugValue(d bool) Option

func WithDockerCertPath

func WithDockerCertPath(s string) Option

func WithDockerImage added in v0.1.0

func WithDockerImage(s string) Option

func WithDockerSocket

func WithDockerSocket(s string) Option

func WithHomedir added in v0.1.3

func WithHomedir(s string) Option

func WithJobId added in v0.1.0

func WithJobId(s string) Option

func WithNodeList added in v0.1.0

func WithNodeList(nl string) Option

func WithReplicas added in v0.1.0

func WithReplicas(rep int) Option

func WithUser added in v0.2.0

func WithUser(s string) Option

func WithUsername added in v0.1.3

func WithUsername(s string) Option

func WithVolumes added in v0.1.0

func WithVolumes(s string) Option

type Options

type Options struct {
	Version                                     string
	DockerSocket, DockerCertPath, DockerImage   string
	Constraints, JobId, Username, User, Homedir string
	NodeList, Volumes                           []string
	Debug, Bundle                               bool
	Replicas                                    int
}

type SshArgs added in v0.1.0

type SshArgs struct {
}

type Wharfie

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

func New

func New(ver string, opts ...Option) Wharfie

func (*Wharfie) AddJobIdLabel added in v0.1.0

func (w *Wharfie) AddJobIdLabel() (err error)

func (*Wharfie) Connect

func (w *Wharfie) Connect()

func (*Wharfie) CreateNetwork added in v0.1.0

func (w *Wharfie) CreateNetwork() (id string, err error)

func (*Wharfie) CreateService added in v0.1.0

func (w *Wharfie) CreateService() (err error)

func (*Wharfie) GetNodesFiltered added in v0.1.0

func (w *Wharfie) GetNodesFiltered() ([]swarm.Node, error)

func (*Wharfie) GetServiceTask added in v0.1.0

func (w *Wharfie) GetServiceTask(node string) (task swarm.Task, err error)

func (*Wharfie) GetTasks added in v0.1.0

func (w *Wharfie) GetTasks() (tasks []swarm.Task, err error)

func (*Wharfie) Log added in v0.1.2

func (w *Wharfie) Log(level, msg string)

func (*Wharfie) Remove added in v0.1.0

func (w *Wharfie) Remove()

func (*Wharfie) RemoveService added in v0.1.0

func (w *Wharfie) RemoveService() (err error)

func (*Wharfie) RmJobIdLabel added in v0.1.0

func (w *Wharfie) RmJobIdLabel() (err error)

func (*Wharfie) Ssh added in v0.1.0

func (w *Wharfie) Ssh(ctx *cli.Context)

func (*Wharfie) Stage added in v0.1.0

func (w *Wharfie) Stage()

func (*Wharfie) WaitForService added in v0.1.0

func (w *Wharfie) WaitForService() (err error)

Jump to

Keyboard shortcuts

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