events

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2017 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const (
	RancherNameserver  = "169.254.169.250"
	RancherDNS         = "io.rancher.container.dns"
	RancherDNSPriority = "io.rancher.container.dns.priority"
	RancherNetwork     = "io.rancher.container.network"
	CNILabel           = "io.rancher.cni.network"
)

Variables

This section is empty.

Functions

func NewDockerClient

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

func Watch

func Watch(poolSize int, nm *network.Manager, bw *binexec.Watcher, disableDNSSetup bool) error

Types

type DockerEventsProcessor

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

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 *docker.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(*docker.APIEvents) error
}

type NetworkManagerHandler

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

func (*NetworkManagerHandler) Handle

func (h *NetworkManagerHandler) Handle(event *docker.APIEvents) error

type SimpleDockerClient

type SimpleDockerClient interface {
	InspectContainer(id string) (*docker.Container, error)
}

type StartHandler

type StartHandler struct {
	Client SimpleDockerClient
}

func (*StartHandler) Handle

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