server

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2015 License: Apache-2.0, Apache-2.0 Imports: 10 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
	// contains filtered or unexported fields
}

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 New added in v1.7.0

func New(dockerClient *docker.Client, etcdClient *etcd.Client, host, logLevel string) *Server

New returns a new instance of Server.

func (*Server) HealthCheckOK added in v1.9.0

func (s *Server) HealthCheckOK(url string, delay, timeout int) bool

func (*Server) IsPortOpen added in v1.5.0

func (s *Server) IsPortOpen(hostAndPort string) bool

IsPortOpen checks if the given port is accepting tcp connections

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