events

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: Apache-2.0 Imports: 13 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/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

func NewDockerClient() (*client.Client, error)

Types

type DockerEventsProcessor

type DockerEventsProcessor struct {
	// contains filtered or unexported fields
}

func NewDockerEventsProcessor

func NewDockerEventsProcessor(poolSize int) *DockerEventsProcessor

func (*DockerEventsProcessor) Process

func (de *DockerEventsProcessor) Process() error

type EventRouter

type EventRouter struct {
	// contains filtered or unexported fields
}

func NewEventRouter

func NewEventRouter(bufferSize int, workerPoolSize int, dockerClient *client.Client,
	handlers map[string][]Handler) (*EventRouter, error)

func (*EventRouter) Start

func (e *EventRouter) Start() error

func (*EventRouter) Stop

func (e *EventRouter) Stop() error

type Handler

type Handler interface {
	Handle(*events.Message) error
}

type SendToRancherHandler

type SendToRancherHandler struct {
	// contains filtered or unexported fields
}

func (*SendToRancherHandler) Handle

func (h *SendToRancherHandler) Handle(event *events.Message) error

type SimpleDockerClient

type SimpleDockerClient interface {
	ContainerInspect(context context.Context, id string) (types.ContainerJSON, error)
}

Jump to

Keyboard shortcuts

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