events

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartRouter

func StartRouter(router Router)

StartRouter calls the listener function and takes the interface for testing

Types

type DockerEventRouter

type DockerEventRouter struct {
	DockerClient *client.Client
}

DockerEventRouter is the Docker event handler implementation

func (DockerEventRouter) Listen

func (de DockerEventRouter) Listen() (<-chan events.Message, <-chan error)

Listen implements the Router interface

type DockerHandler

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

DockerHandler handles docker messages

func NewDockerHandler

func NewDockerHandler() *DockerHandler

NewDockerHandler returns a docker handler with crontab

func (DockerHandler) Handle

func (dh DockerHandler) Handle(msg Message)

Handle implements handler interface

type Handler

type Handler interface {
	Handle(Message)
}

Handler handles messages

type Message

type Message *events.Message

Message is a message from an event stream

type Router

type Router interface {
	Listen() (<-chan events.Message, <-chan error)
}

Router Interface

func NewEventRouter

func NewEventRouter() (Router, error)

NewEventRouter returns the a Docker event handler

Jump to

Keyboard shortcuts

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