server

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2015 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	DockerClient *docker.Client
	EtcdClient   *etcd.Client
}

Server is the main entrypoint for a publisher. It listens on a docker client for events and publishes their host:port to the etcd client.

func (*Server) IsPublishableApp

func (s *Server) IsPublishableApp(name string) bool

isPublishableApp determines if the application should be published to etcd.

func (*Server) Listen

func (s *Server) Listen(ttl time.Duration)

Listen adds an event listener to the docker client and publishes containers that were started.

func (*Server) Poll

func (s *Server) Poll(ttl time.Duration)

Poll lists all containers from the docker client every time the TTL comes up and publishes them to etcd

Jump to

Keyboard shortcuts

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