events

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: Apache-2.0 Imports: 9 Imported by: 7

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/rancher/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

This section is empty.

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)
}

Jump to

Keyboard shortcuts

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