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
Click to show internal directories.
Click to hide internal directories.