Movatterモバイル変換


[0]ホーム

URL:


daemon

package
v2.0.0-beta.5Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License:Apache-2.0Imports:14Imported by:0

Details

Repository

github.com/moby/moby

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcWaitInspectWithArgs

func WaitInspectWithArgs(dockerBinary, name, expr, expectedstring, timeouttime.Duration, arg ...string)error

WaitInspectWithArgs waits for the specified expression to be equals to the specified expected string in the given time.Deprecated: use cli.WaitCmd instead

Types

typeDaemon

type Daemon struct {*daemon.Daemon// contains filtered or unexported fields}

Daemon represents a Docker daemon for the testing framework.

funcNew

func New(ttesting.TB, dockerBinarystring, dockerdBinarystring, ops ...daemon.Option) *Daemon

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

func (d *Daemon) CheckActiveContainerCount(ctxcontext.Context) func(t *testing.T) (any,string)

CheckActiveContainerCount returns the number of active containersFIXME(vdemeester) should re-use ActivateContainers in some way

func (*Daemon)CheckControlAvailable

func (d *Daemon) CheckControlAvailable(ctxcontext.Context) func(t *testing.T) (any,string)

CheckControlAvailable returns the current swarm control available

func (*Daemon)CheckLeader

func (d *Daemon) CheckLeader(ctxcontext.Context) func(t *testing.T) (any,string)

CheckLeader returns whether there is a leader on the swarm or not

func (*Daemon)CheckLocalNodeState

func (d *Daemon) CheckLocalNodeState(ctxcontext.Context) func(t *testing.T) (any,string)

CheckLocalNodeState returns the current swarm node state

func (*Daemon)CheckNodeReadyCount

func (d *Daemon) CheckNodeReadyCount(ctxcontext.Context) func(t *testing.T) (any,string)

CheckNodeReadyCount returns the number of ready node on the swarm

func (*Daemon)CheckPluginImage

func (d *Daemon) CheckPluginImage(ctxcontext.Context, pluginstring) func(c *testing.T) (any,string)

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

func (d *Daemon) CheckRunningTaskImages(ctxcontext.Context) func(t *testing.T) (any,string)

CheckRunningTaskImages returns the times each image is running as a task.

func (*Daemon)CheckRunningTaskNetworks

func (d *Daemon) CheckRunningTaskNetworks(ctxcontext.Context) func(t *testing.T) (any,string)

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

func (d *Daemon) CheckServiceTasks(ctxcontext.Context, servicestring) func(*testing.T) (any,string)

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

func (d *Daemon) Cmd(args ...string) (string,error)

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

func (d *Daemon) CmdRetryOutOfSequence(args ...string) (string,error)

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

func (d *Daemon) Command(args ...string)icmd.Cmd

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

func (d *Daemon) GetIDByName(namestring) (string,error)

GetIDByName returns the ID of an object (container, volume, …) given its name

func (*Daemon)InspectField

func (d *Daemon) InspectField(name, filterstring) (string,error)

InspectField returns the field filter by 'filter'

func (*Daemon)PrependHostArg

func (d *Daemon) PrependHostArg(args []string) []string

PrependHostArg prepend the specified arguments by the daemon host flags

func (*Daemon)WaitRun

func (d *Daemon) WaitRun(contIDstring)error

WaitRun waits for a container to be running for 10s

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp