builders

package
v0.11.2-0...-4534dcd Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Autolock

func Autolock() func(*swarm.Swarm)

Autolock set the swarm into autolock mode

func Hostname

func Hostname(hostname string) func(*swarm.Node)

Hostname sets the node hostname

func Leader

func Leader() func(*swarm.ManagerStatus)

Leader sets the current node as a leader

func Manager

func Manager(managerStatusBuilders ...func(*swarm.ManagerStatus)) func(*swarm.Node)

Manager set the current node as a manager

func ManagerStatus

func ManagerStatus(managerStatusBuilders ...func(*swarm.ManagerStatus)) *swarm.ManagerStatus

ManagerStatus create a ManageStatus with default values.

func Node

func Node(builders ...func(*swarm.Node)) *swarm.Node

Node creates a node with default values. Any number of node function builder can be pass to augment it.

func NodeID

func NodeID(id string) func(*swarm.Node)

NodeID sets the node id

func NodeLabels

func NodeLabels(labels map[string]string) func(*swarm.Node)

NodeLabels sets the node labels

func PortStatus

func PortStatus(portConfigs []swarm.PortConfig) func(*swarm.TaskStatus)

PortStatus sets the tasks port config status FIXME(vdemeester) should be a sub builder 👼

func ServiceID

func ServiceID(id string) func(*swarm.Task)

ServiceID sets the task service's ID

func StatusErr

func StatusErr(err string) func(*swarm.TaskStatus)

StatusErr sets the tasks status error

func Swarm

func Swarm(swarmBuilders ...func(*swarm.Swarm)) *swarm.Swarm

Swarm creates a swarm with default values. Any number of swarm function builder can be pass to augment it.

func Task

func Task(taskBuilders ...func(*swarm.Task)) *swarm.Task

Task creates a task with default values . Any number of task function builder can be pass to augment it.

func TaskID

func TaskID(id string) func(*swarm.Task)

TaskID sets the task ID

func TaskSpec

func TaskSpec(specBuilders ...func(*swarm.TaskSpec)) *swarm.TaskSpec

TaskSpec creates a task spec with default values . Any number of taskSpec function builder can be pass to augment it.

func TaskStatus

func TaskStatus(statusBuilders ...func(*swarm.TaskStatus)) *swarm.TaskStatus

TaskStatus creates a task status with default values . Any number of taskStatus function builder can be pass to augment it.

func Timestamp

func Timestamp(t time.Time) func(*swarm.TaskStatus)

Timestamp sets the task status timestamp

func WithStatus

func WithStatus(statusBuilders ...func(*swarm.TaskStatus)) func(*swarm.Task)

WithStatus sets the task status

Types

This section is empty.

Jump to

Keyboard shortcuts

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