Documentation ¶
Index ¶
- func StartNNodeEtcdTopology(n int) (felixes []*Container, etcd *Container, client client.Interface)
- func StartTwoNodeEtcdTopology() (felixes []*Container, etcd *Container, client client.Interface)
- type Container
- func (c *Container) CanConnectTo(ip, port, protocol string) bool
- func (c *Container) CopyFileIntoContainer(hostPath, containerPath string) error
- func (c *Container) DockerInspect(format string) string
- func (c *Container) EnsureBinary(name string)
- func (c *Container) Exec(cmd ...string)
- func (c *Container) ExecMayFail(cmd ...string) error
- func (c *Container) ExecOutput(args ...string) (string, error)
- func (c *Container) GetHostname() string
- func (c *Container) GetIP() string
- func (c *Container) GetPIDs(processName string) []int
- func (c *Container) ListedInDockerPS() bool
- func (c *Container) Remove()
- func (c *Container) SourceName() string
- func (c *Container) Start()
- func (c *Container) Stop()
- func (c *Container) Stopped() bool
- func (c *Container) WaitNotRunning(timeout time.Duration)
- func (c *Container) WaitUntilRunning()
- type RunOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartNNodeEtcdTopology ¶
StartNNodeEtcdTopology starts an etcd container and a set of Felix hosts. If n > 1, sets up IPIP, otherwise this is skipped.
- Configures an IPAM pool for 10.65.0.0/16 (so that Felix programs the all-IPAM blocks IP set) but (for simplicity) we don't actually use IPAM to assign IPs.
- Configures routes between the hosts, giving each host 10.65.x.0/24, where x is the index in the returned array. When creating workloads, use IPs from the relevant block.
- Configures the Tunnel IP for each host as 10.65.x.1.
func StartTwoNodeEtcdTopology ¶
StartTwoNodeEtcdTopology starts an etcd container and a pair of Felix hosts connected with IPIP.
- Configures an IPAM pool for 10.65.0.0/16 (so that Felix programs the all-IPAM blocks IP set) but (for simplicity) we don't actually use IPAM to assign IPs.
- Configures routes between the two "hosts", giving each host 10.65.x.0/24, where x is the index in the returned array. When creating workloads, use IPs from the relevant block.
- Configures the Tunnel IP as 10.65.x.1
Types ¶
type Container ¶
type Container struct { Name string IP string Hostname string // contains filtered or unexported fields }
func StartSingleNodeEtcdTopology ¶
StartSingleNodeEtcdTopology starts an etcd container and a single Felix container; it initialises the datastore and installs a Node resource for the Felix node.
func (*Container) CanConnectTo ¶
func (*Container) CopyFileIntoContainer ¶
func (*Container) DockerInspect ¶
func (*Container) EnsureBinary ¶
func (*Container) ExecMayFail ¶
func (*Container) GetHostname ¶
func (*Container) ListedInDockerPS ¶
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()
Click to show internal directories.
Click to hide internal directories.