daemon
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- func WaitInspectWithArgs(dockerBinary, name, expr, expected string, timeout time.Duration, ...) error
- type Daemon
- func (d *Daemon) CheckActiveContainerCount(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckControlAvailable(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckLeader(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckLocalNodeState(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckNodeReadyCount(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckPluginImage(ctx context.Context, plugin string) func(c *testing.T) (any, string)
- func (d *Daemon) CheckPluginRunning(ctx context.Context, plugin string) func(c *testing.T) (any, string)
- func (d *Daemon) CheckRunningTaskImages(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckRunningTaskNetworks(ctx context.Context) func(t *testing.T) (any, string)
- func (d *Daemon) CheckServiceRunningTasks(ctx context.Context, service string) func(*testing.T) (any, string)
- func (d *Daemon) CheckServiceTasks(ctx context.Context, service string) func(*testing.T) (any, string)
- func (d *Daemon) CheckServiceTasksInState(ctx context.Context, service string, state swarm.TaskState, message string) func(*testing.T) (any, string)
- func (d *Daemon) CheckServiceTasksInStateWithError(ctx context.Context, service string, state swarm.TaskState, ...) func(*testing.T) (any, string)
- func (d *Daemon) CheckServiceUpdateState(ctx context.Context, service string) func(*testing.T) (any, string)
- func (d *Daemon) Cmd(args ...string) (string, error)
- func (d *Daemon) CmdRetryOutOfSequence(args ...string) (string, error)
- func (d *Daemon) Command(args ...string) icmd.Cmd
- func (d *Daemon) GetIDByName(name string) (string, error)
- func (d *Daemon) InspectField(name, filter string) (string, error)
- func (d *Daemon) PrependHostArg(args []string) []string
- func (d *Daemon) WaitRun(contID string) error
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
Types¶
typeDaemon¶
Daemon represents a Docker daemon for the testing framework.
funcNew¶
New returns a Daemon instance to be used for testing.This will create a directory such as d123456789 in the folder specified by $DOCKER_INTEGRATION_DAEMON_DEST or $DEST.The daemon will not automatically start.
func (*Daemon)CheckActiveContainerCount¶
CheckActiveContainerCount returns the number of active containersFIXME(vdemeester) should re-use ActivateContainers in some way
func (*Daemon)CheckControlAvailable¶
CheckControlAvailable returns the current swarm control available
func (*Daemon)CheckLeader¶
CheckLeader returns whether there is a leader on the swarm or not
func (*Daemon)CheckLocalNodeState¶
CheckLocalNodeState returns the current swarm node state
func (*Daemon)CheckNodeReadyCount¶
CheckNodeReadyCount returns the number of ready node on the swarm
func (*Daemon)CheckPluginImage¶
CheckPluginImage returns the runtime state of the plugin
func (*Daemon)CheckPluginRunning¶
func (d *Daemon) CheckPluginRunning(ctxcontext.Context, pluginstring) func(c *testing.T) (any,string)
CheckPluginRunning returns the runtime state of the plugin
func (*Daemon)CheckRunningTaskImages¶
CheckRunningTaskImages returns the times each image is running as a task.
func (*Daemon)CheckRunningTaskNetworks¶
CheckRunningTaskNetworks returns the number of times each network is referenced from a task.
func (*Daemon)CheckServiceRunningTasks¶
func (d *Daemon) CheckServiceRunningTasks(ctxcontext.Context, servicestring) func(*testing.T) (any,string)
CheckServiceRunningTasks returns the number of running tasks for the specified service
func (*Daemon)CheckServiceTasks¶
CheckServiceTasks returns the number of tasks for the specified service
func (*Daemon)CheckServiceTasksInState¶
func (d *Daemon) CheckServiceTasksInState(ctxcontext.Context, servicestring, stateswarm.TaskState, messagestring) func(*testing.T) (any,string)
CheckServiceTasksInState returns the number of tasks with a matching state,and optional message substring.
func (*Daemon)CheckServiceTasksInStateWithError¶
func (d *Daemon) CheckServiceTasksInStateWithError(ctxcontext.Context, servicestring, stateswarm.TaskState, errorMessagestring) func(*testing.T) (any,string)
CheckServiceTasksInStateWithError returns the number of tasks with a matching state,and optional message substring.
func (*Daemon)CheckServiceUpdateState¶
func (d *Daemon) CheckServiceUpdateState(ctxcontext.Context, servicestring) func(*testing.T) (any,string)
CheckServiceUpdateState returns the current update state for the specified service
func (*Daemon)Cmd¶
Cmd executes a docker CLI command against this daemon.Example: d.Cmd("version") will run docker -H unix://path/to/unix.sock version
func (*Daemon)CmdRetryOutOfSequence¶
CmdRetryOutOfSequence tries the specified command against the current daemonup to 10 times, retrying if it encounters an "update out of sequence" error.
func (*Daemon)Command¶
Command creates a docker CLI command against this daemon, to be executed later.Example: d.Command("version") creates a command to run "docker -H unix://path/to/unix.sock version"
func (*Daemon)GetIDByName¶
GetIDByName returns the ID of an object (container, volume, …) given its name
func (*Daemon)InspectField¶
InspectField returns the field filter by 'filter'
func (*Daemon)PrependHostArg¶
PrependHostArg prepend the specified arguments by the daemon host flags