Documentation ¶
Index ¶
- type DockerClient
- func (c *DockerClient) Close() error
- func (c *DockerClient) CopyFrom(containerId, source, dest string) error
- func (c *DockerClient) CopyTo(containerId, source, dest string) error
- func (c *DockerClient) Create(imgName, containerName, hostName string, volumes []string, ipv6, mpls bool) (string, error)
- func (c *DockerClient) Exec(containerId string, cmd []string) (string, error)
- func (c *DockerClient) ExecOutStream(containerId string, cmd []string, out io.Writer) error
- func (c *DockerClient) ExecTty(containerId string, cmd []string, in io.ReadCloser, out io.Writer, ...) error
- func (c *DockerClient) ExecWithWorkingDir(containerId string, cmd []string, workingDir string) (string, error)
- func (c *DockerClient) Get(containerId string) (*types.Container, error)
- func (c *DockerClient) GetState(containerId string) (string, error)
- func (c *DockerClient) ImagePull(imgName string) error
- func (c *DockerClient) IsFileExist(containerId, filepath string) bool
- func (c *DockerClient) IsFolderExist(containerId, filepath string) bool
- func (c *DockerClient) IsImagePresent(imgName string) (bool, error)
- func (c *DockerClient) List(prefix string) ([]NetemContainerList, error)
- func (c *DockerClient) Pid(containerId string) (int, error)
- func (c *DockerClient) Rm(containerId string) error
- func (c *DockerClient) Start(containerId string) error
- func (c *DockerClient) Stop(containerId string) error
- type DockerNode
- func (n *DockerNode) AddInterface(ifName string, ifIndex int, ns netns.NsHandle) error
- func (n *DockerNode) CanRunConsole() error
- func (n *DockerNode) Capture(ifIndex int, out io.Writer) error
- func (n *DockerNode) Close() error
- func (n *DockerNode) Console(shell bool, in io.ReadCloser, out io.Writer, resizeCh chan term.Winsize) error
- func (n *DockerNode) CopyFrom(source, dest string) error
- func (n *DockerNode) CopyTo(source, dest string) error
- func (n *DockerNode) Create(imgName string, ipv6 bool) error
- func (n *DockerNode) GetInterfaceName(ifIndex int) string
- func (n *DockerNode) GetInterfacesState() map[string]link.IfState
- func (n *DockerNode) GetName() string
- func (n *DockerNode) GetNetns() (netns.NsHandle, error)
- func (n *DockerNode) GetShortName() string
- func (n *DockerNode) GetStatus() (DockerNodeStatus, error)
- func (n *DockerNode) GetType() string
- func (n *DockerNode) IsRunning() bool
- func (n *DockerNode) LoadConfig(confPath string) ([]string, error)
- func (n *DockerNode) PrepareInterface(ifName string)
- func (n *DockerNode) ReadConfigFiles(confDir string) (map[string][]byte, error)
- func (n *DockerNode) Save(dstPath string) error
- func (n *DockerNode) SetInterfaceState(ifIndex int, state link.IfState) error
- func (n *DockerNode) Start() error
- func (n *DockerNode) Stop() error
- type DockerNodeOptions
- type DockerNodeStatus
- type NetemContainerList
- type VrrpOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
func NewDockerClient ¶
func NewDockerClient() (*DockerClient, error)
func (*DockerClient) Close ¶
func (c *DockerClient) Close() error
func (*DockerClient) CopyFrom ¶
func (c *DockerClient) CopyFrom(containerId, source, dest string) error
func (*DockerClient) CopyTo ¶
func (c *DockerClient) CopyTo(containerId, source, dest string) error
func (*DockerClient) Exec ¶
func (c *DockerClient) Exec(containerId string, cmd []string) (string, error)
func (*DockerClient) ExecOutStream ¶
func (*DockerClient) ExecTty ¶
func (c *DockerClient) ExecTty(containerId string, cmd []string, in io.ReadCloser, out io.Writer, resizeCh chan term.Winsize) error
func (*DockerClient) ExecWithWorkingDir ¶ added in v0.1.6
func (*DockerClient) ImagePull ¶
func (c *DockerClient) ImagePull(imgName string) error
func (*DockerClient) IsFileExist ¶ added in v0.1.3
func (c *DockerClient) IsFileExist(containerId, filepath string) bool
func (*DockerClient) IsFolderExist ¶ added in v0.1.6
func (c *DockerClient) IsFolderExist(containerId, filepath string) bool
func (*DockerClient) IsImagePresent ¶
func (c *DockerClient) IsImagePresent(imgName string) (bool, error)
func (*DockerClient) List ¶
func (c *DockerClient) List(prefix string) ([]NetemContainerList, error)
func (*DockerClient) Rm ¶
func (c *DockerClient) Rm(containerId string) error
func (*DockerClient) Start ¶
func (c *DockerClient) Start(containerId string) error
func (*DockerClient) Stop ¶
func (c *DockerClient) Stop(containerId string) error
type DockerNode ¶
type DockerNode struct { PrjID string ID string Name string ShortName string Type string Interfaces map[string]link.IfState LocalNetnsName string Running bool ConfigLoaded bool Mpls bool Vrfs []string Vrrps []VrrpOptions Volumes []string Logger *logrus.Entry }
func NewDockerNode ¶
func NewDockerNode(prjID string, dockerOpts DockerNodeOptions) (*DockerNode, error)
func (*DockerNode) AddInterface ¶
func (*DockerNode) CanRunConsole ¶
func (n *DockerNode) CanRunConsole() error
func (*DockerNode) Close ¶
func (n *DockerNode) Close() error
func (*DockerNode) Console ¶
func (n *DockerNode) Console(shell bool, in io.ReadCloser, out io.Writer, resizeCh chan term.Winsize) error
func (*DockerNode) CopyFrom ¶
func (n *DockerNode) CopyFrom(source, dest string) error
func (*DockerNode) CopyTo ¶
func (n *DockerNode) CopyTo(source, dest string) error
func (*DockerNode) GetInterfaceName ¶
func (n *DockerNode) GetInterfaceName(ifIndex int) string
func (*DockerNode) GetInterfacesState ¶ added in v0.1.1
func (n *DockerNode) GetInterfacesState() map[string]link.IfState
func (*DockerNode) GetName ¶
func (n *DockerNode) GetName() string
func (*DockerNode) GetShortName ¶ added in v0.1.1
func (n *DockerNode) GetShortName() string
func (*DockerNode) GetStatus ¶
func (n *DockerNode) GetStatus() (DockerNodeStatus, error)
func (*DockerNode) GetType ¶
func (n *DockerNode) GetType() string
func (*DockerNode) IsRunning ¶
func (n *DockerNode) IsRunning() bool
func (*DockerNode) LoadConfig ¶
func (n *DockerNode) LoadConfig(confPath string) ([]string, error)
func (*DockerNode) PrepareInterface ¶
func (n *DockerNode) PrepareInterface(ifName string)
func (*DockerNode) ReadConfigFiles ¶ added in v0.2.0
func (n *DockerNode) ReadConfigFiles(confDir string) (map[string][]byte, error)
func (*DockerNode) Save ¶
func (n *DockerNode) Save(dstPath string) error
func (*DockerNode) SetInterfaceState ¶
func (n *DockerNode) SetInterfaceState(ifIndex int, state link.IfState) error
func (*DockerNode) Start ¶
func (n *DockerNode) Start() error
func (*DockerNode) Stop ¶
func (n *DockerNode) Stop() error
type DockerNodeOptions ¶
type DockerNodeStatus ¶
type DockerNodeStatus struct {
Running bool
}
type NetemContainerList ¶
type VrrpOptions ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.