swarm

package
v0.0.0-...-4adcdaa Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerPoll

func ContainerPoll(config *poll.Settings)

ContainerPoll tweaks the pollSettings for `container`

func CreateService

func CreateService(t *testing.T, d *daemon.Daemon, opts ...ServiceSpecOpt) string

CreateService creates a service on the passed in swarm daemon.

func ExecTask

func ExecTask(t *testing.T, d *daemon.Daemon, task swarmtypes.Task, config types.ExecConfig) types.HijackedResponse

ExecTask runs the passed in exec config on the given task

func GetRunningTasks

func GetRunningTasks(t *testing.T, d *daemon.Daemon, serviceID string) []swarmtypes.Task

GetRunningTasks gets the list of running tasks for a service

func NetworkPoll

func NetworkPoll(config *poll.Settings)

NetworkPoll tweaks the pollSettings for `network`

func NewSwarm

func NewSwarm(t *testing.T, testEnv *environment.Execution, ops ...func(*daemon.Daemon)) *daemon.Daemon

NewSwarm creates a swarm daemon for testing

func ServicePoll

func ServicePoll(config *poll.Settings)

ServicePoll tweaks the pollSettings for `service`

func ServiceWithImage

func ServiceWithImage(image string) func(*swarmtypes.ServiceSpec)

ServiceWithImage sets the image to use for the service

func ServiceWithInit

func ServiceWithInit(b *bool) func(*swarmtypes.ServiceSpec)

ServiceWithInit sets whether the service should use init or not

Types

type ServiceSpecOpt

type ServiceSpecOpt func(*swarmtypes.ServiceSpec)

ServiceSpecOpt is used with `CreateService` to pass in service spec modifiers

func ServiceWithCommand

func ServiceWithCommand(cmd []string) ServiceSpecOpt

ServiceWithCommand sets the command to use for the service

func ServiceWithConfig

func ServiceWithConfig(configRef *swarmtypes.ConfigReference) ServiceSpecOpt

ServiceWithConfig adds the config reference to the service

func ServiceWithEndpoint

func ServiceWithEndpoint(endpoint *swarmtypes.EndpointSpec) ServiceSpecOpt

ServiceWithEndpoint sets the Endpoint of the service

func ServiceWithName

func ServiceWithName(name string) ServiceSpecOpt

ServiceWithName sets the name of the service

func ServiceWithNetwork

func ServiceWithNetwork(network string) ServiceSpecOpt

ServiceWithNetwork sets the network of the service

func ServiceWithReplicas

func ServiceWithReplicas(n uint64) ServiceSpecOpt

ServiceWithReplicas sets the replicas for the service

func ServiceWithSecret

func ServiceWithSecret(secretRef *swarmtypes.SecretReference) ServiceSpecOpt

ServiceWithSecret adds the secret reference to the service

Jump to

Keyboard shortcuts

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