events

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

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 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 NewEventRouter(bufferSize int, workerPoolSize int, dockerClient *docker.Client,
	handlers map[string][]Handler) (*EventRouter, error)

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 Handler added in v0.7.0

type Handler interface {
	Handle(*docker.APIEvents) 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 SimpleDockerClient interface {
	InspectContainer(id string) (*docker.Container, error)
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL