swarm

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SwarmModeGlobalConfig

type SwarmModeGlobalConfig struct {
	ManagerToken        string
	BootstrapManagerURL string
	WorkerToken         string
}

SwarmModeGlobalConfig contain Swarm Mode global configuration

func (*SwarmModeGlobalConfig) InitSwarmModeCluster

func (gc *SwarmModeGlobalConfig) InitSwarmModeCluster(h *host.Host) error

InitSwarmModeCluster initialize a new Swarm mode cluster on the given host and returns the Manager/Worker join tokens

func (*SwarmModeGlobalConfig) IsSwarmModeClusterInitialized

func (gc *SwarmModeGlobalConfig) IsSwarmModeClusterInitialized() bool

IsSwarmModeClusterInitialized returns true if Swarm mode cluster is initialized (Manager/Worker tokens set), and false otherwise

func (*SwarmModeGlobalConfig) JoinSwarmModeCluster

func (gc *SwarmModeGlobalConfig) JoinSwarmModeCluster(host *host.Host, isManager bool) error

JoinSwarmModeCluster makes the host join a Swarm mode cluster as Manager or Worker

type SwarmStandaloneGlobalConfig

type SwarmStandaloneGlobalConfig struct {
	Image       string
	Discovery   string
	Strategy    string
	MasterFlags []string
	JoinFlags   []string
}

SwarmStandaloneGlobalConfig contain Swarm standalone global configuration

func (*SwarmStandaloneGlobalConfig) CreateNodeConfig

func (gc *SwarmStandaloneGlobalConfig) CreateNodeConfig(nodeName string, isMaster bool, isWorker bool) *swarm.Options

CreateNodeConfig returns a configured SwarmOptions for HostOptions struct

func (*SwarmStandaloneGlobalConfig) GenerateDiscoveryToken

func (gc *SwarmStandaloneGlobalConfig) GenerateDiscoveryToken() error

GenerateDiscoveryToken generate a new Docker Swarm discovery token from Docker Hub

Jump to

Keyboard shortcuts

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