README
¶
A Note on testing from a Mac
Some of these tests actualy spin up containers and use nsenter to manipulate IPs. In a typical Mac/b2d setup, the won't pass out of the box. There's some setup you need to do:
boot2docker ssh
cp /Users/PATH/TO/PROJECT/host-api/src/github.com/rancherio/host-api/scripts/lib/net-util.sh .
cp /Users/PATH/TO/PROJECT/python-agent/vendor/nsenter .
vi net-util.sh # change /bin/bash to /bin/sh. b2d doesnt have bash. This is a hack but works
cp net-util.sh nsenter /usr/local/bin/
sudo mkdir /host
sudo ln -s /proc/ /host/proc
TODO Write a script for this
Documentation
¶
Index ¶
Constants ¶
View Source
const RancherDns = "io.rancher.container.dns"
View Source
const RancherDomain = "rancher.internal"
View Source
const RancherIPEnvKey = "RANCHER_IP="
View Source
const RancherIPLabelKey = "io.rancher.container.ip"
View Source
const RancherNameserver = "169.254.169.250"
View Source
const RancherSystemLabelKey = "io.rancher.container.system"
Variables ¶
This section is empty.
Functions ¶
func NewDockerClient ¶ added in v0.7.0
func NewDockerClient() (*docker.Client, error)
Types ¶
type DockerEventsProcessor ¶ added in v0.8.0
type DockerEventsProcessor struct {
// contains filtered or unexported fields
}
func NewDockerEventsProcessor ¶ added in v0.8.0
func NewDockerEventsProcessor(poolSize int) *DockerEventsProcessor
func (*DockerEventsProcessor) Process ¶ added in v0.8.0
func (de *DockerEventsProcessor) Process() error
type EventRouter ¶ added in v0.7.0
type EventRouter struct {
// contains filtered or unexported fields
}
func NewEventRouter ¶ added in v0.7.0
func (*EventRouter) Start ¶ added in v0.7.0
func (e *EventRouter) Start() error
func (*EventRouter) Stop ¶ added in v0.7.0
func (e *EventRouter) Stop() error
type SendToRancherHandler ¶ added in v0.9.0
type SendToRancherHandler struct {
// contains filtered or unexported fields
}
func (*SendToRancherHandler) Handle ¶ added in v0.9.0
func (h *SendToRancherHandler) Handle(event *docker.APIEvents) error
type SimpleDockerClient ¶ added in v0.8.0
type StartHandler ¶ added in v0.7.0
type StartHandler struct { Client SimpleDockerClient ContainerStateDir string }
func (*StartHandler) Handle ¶ added in v0.7.0
func (h *StartHandler) Handle(event *docker.APIEvents) error
Click to show internal directories.
Click to hide internal directories.