Documentation ¶
Index ¶
- func NextContainerIndex() int
- func UniqueName(namePrefix string) string
- type Container
- func (c *Container) AttachTCPDump(iface string) *tcpdump.TCPDump
- func (c *Container) BPFNATDump(ipv6 bool) map[string][]string
- func (c *Container) BPFNATHasBackendForService(svcIP string, svcPort, proto int, ip string, port int) bool
- func (c *Container) BPFRoutes() string
- func (c *Container) CanConnectTo(ip, port, protocol string, opts ...connectivity.CheckOption) *connectivity.Result
- func (c *Container) CopyFileIntoContainer(hostPath, containerPath string) error
- func (c *Container) DataRaces() []string
- func (c *Container) DisableRaceDetector()
- func (c *Container) DockerInspect(format string) string
- func (c *Container) Exec(cmd ...string)
- func (c *Container) ExecCombinedOutput(args ...string) (string, error)
- func (c *Container) ExecMayFail(cmd ...string) error
- func (c *Container) ExecOutput(args ...string) (string, error)
- func (c *Container) ExecOutputFn(args ...string) func() (string, error)
- func (c *Container) ExecWithInput(input []byte, cmd ...string)
- func (c *Container) FileExists(path string) bool
- func (c *Container) GetHostname() string
- func (c *Container) GetID() string
- func (c *Container) GetIP() string
- func (c *Container) GetIPPrefix() string
- func (c *Container) GetIPv6() string
- func (c *Container) GetIPv6Prefix() string
- func (c *Container) GetPIDs(processName string) []int
- func (c *Container) GetProcInfo(processName string) []ProcInfo
- func (c *Container) GetSinglePID(processName string) int
- func (c *Container) IPSetNames() []string
- func (c *Container) IPSetSize(ipSetName string) int
- func (c *Container) IPSetSizeFn(ipSetName string) func() int
- func (c *Container) IPSetSizes() map[string]int
- func (c *Container) ListedInDockerPS() bool
- func (c *Container) NFTSetSize(name string) int
- func (c *Container) NFTSetSizeFn(name string) func() int
- func (c *Container) NFTSetSizes() map[string]int
- func (c *Container) NumIPSets() int
- func (c *Container) NumNFTSetMembers(ipVersion int, setName string) int
- func (c *Container) NumTCBPFProgs(ifaceName string) int
- func (c *Container) NumTCBPFProgsEth0() int
- func (c *Container) NumTCBPFProgsFn(ifaceName string) func() int
- func (c *Container) PreRetryCleanup(ip, port, protocol string, opts ...connectivity.CheckOption)
- func (c *Container) Remove()
- func (c *Container) Signal(sig os.Signal)
- func (c *Container) SourceIPs() []string
- func (c *Container) SourceName() string
- func (c *Container) Start()
- func (c *Container) Stop()
- func (c *Container) StopLogs()
- func (c *Container) Stopped() bool
- func (c *Container) WaitNotRunning(timeout time.Duration)
- func (c *Container) WaitUntilRunning()
- func (c *Container) WatchStderrFor(re *regexp.Regexp) chan struct{}
- func (c *Container) WatchStdoutFor(re *regexp.Regexp) chan struct{}
- type ProcInfo
- type RunOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NextContainerIndex ¶
func NextContainerIndex() int
func UniqueName ¶
Types ¶
type Container ¶
type Container struct { Name string IP string ExtraSourceIPs []string IPPrefix string IPv6 string IPv6Prefix string Hostname string Stdin io.WriteCloser // contains filtered or unexported fields }
func RunWithFixedName ¶
func (*Container) AttachTCPDump ¶
AttachTCPDump returns tcpdump attached to the container
func (*Container) BPFNATDump ¶
BPFNATDump returns parsed out NAT maps keyed by "<ip> port <port> proto <proto>". Each value is list of "<ip>:<port>".
func (*Container) BPFNATHasBackendForService ¶
func (c *Container) BPFNATHasBackendForService(svcIP string, svcPort, proto int, ip string, port int) bool
BPFNATHasBackendForService returns true is the given service has the given backend programmed in NAT tables
func (*Container) BPFRoutes ¶
BPFRoutes returns the output of calico-bpf routes dump, trimmed of whitespace and sorted.
func (*Container) CanConnectTo ¶
func (c *Container) CanConnectTo(ip, port, protocol string, opts ...connectivity.CheckOption) *connectivity.Result
func (*Container) CopyFileIntoContainer ¶
func (*Container) DisableRaceDetector ¶
func (c *Container) DisableRaceDetector()
DisableRaceDetector disables race detection for this test. This is useful for testing the race detection logic.
func (*Container) DockerInspect ¶
func (*Container) ExecCombinedOutput ¶
func (*Container) ExecMayFail ¶
func (*Container) ExecOutputFn ¶
func (*Container) ExecWithInput ¶
func (*Container) FileExists ¶
func (*Container) GetHostname ¶
func (*Container) GetIPPrefix ¶
func (*Container) GetIPv6Prefix ¶
func (*Container) GetProcInfo ¶
func (*Container) GetSinglePID ¶
func (*Container) IPSetNames ¶
func (*Container) IPSetSize ¶
IPSetSize returns the size of the given (netfilter) IP set (or 0 is it is not present).
func (*Container) IPSetSizeFn ¶
func (*Container) IPSetSizes ¶
func (*Container) ListedInDockerPS ¶
func (*Container) NFTSetSize ¶
func (*Container) NFTSetSizeFn ¶
func (*Container) NFTSetSizes ¶
func (*Container) NumNFTSetMembers ¶
func (*Container) NumTCBPFProgs ¶
NumTCBPFProgs Returns the number of TC BPF programs attached to the given interface. Only direct-action programs are listed (i.e. the type that we use).
func (*Container) NumTCBPFProgsEth0 ¶
NumTCBPFProgs Returns the number of TC BPF programs attached to eth0. Only direct-action programs are listed (i.e. the type that we use).
func (*Container) NumTCBPFProgsFn ¶
func (*Container) PreRetryCleanup ¶
func (c *Container) PreRetryCleanup(ip, port, protocol string, opts ...connectivity.CheckOption)
func (*Container) Remove ¶
func (c *Container) Remove()
Remove deletes a container. Should be manually called after a non-auto-removed container is stopped.
func (*Container) SourceName ¶
func (*Container) Start ¶
func (c *Container) Start()
Start executes "docker start" on a container. Useful when used after Stop() to restart a container.
func (*Container) WaitNotRunning ¶
func (*Container) WaitUntilRunning ¶
func (c *Container) WaitUntilRunning()