bridge

package
v7.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

generated by go-extpoints -- DO NOT EDIT

Index

Constants

This section is empty.

Variables

View Source
var AdapterFactories = &adapterFactoryExt{
	newExtensionPoint(new(AdapterFactory)),
}
View Source
var Hostname string

Functions

func Register

func Register(component interface{}, name string) []string

func Unregister

func Unregister(name string) []string

Types

type AdapterFactory

type AdapterFactory interface {
	New(uri *url.URL) RegistryAdapter
}

type Bridge

type Bridge struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(docker *dockerapi.Client, adapterUri string, config Config) (*Bridge, error)

func (*Bridge) Add

func (b *Bridge) Add(containerId string)

func (*Bridge) Ping

func (b *Bridge) Ping() error

func (*Bridge) Refresh

func (b *Bridge) Refresh()

func (*Bridge) Remove

func (b *Bridge) Remove(containerId string)

func (*Bridge) RemoveOnExit

func (b *Bridge) RemoveOnExit(containerId string)

func (*Bridge) SetupSigtermBehavior

func (b *Bridge) SetupSigtermBehavior(behavior string, msg *dockerapi.APIEvents, ttl int, checkStatus string)

func (*Bridge) Sync

func (b *Bridge) Sync(quiet bool)

type Config

type Config struct {
	HostIp            string
	Internal          bool
	UseIpFromLabel    string
	ForceTags         string
	RefreshTtl        int
	RefreshInterval   int
	DeregisterCheck   string
	Cleanup           bool
	ContainersFilters ContainersFilters
}

type ContainersFilters

type ContainersFilters map[string][]string

func (*ContainersFilters) Set

func (f *ContainersFilters) Set(value string) error

func (*ContainersFilters) String

func (f *ContainersFilters) String() string

func (*ContainersFilters) WithContainerId

func (f *ContainersFilters) WithContainerId(containerId string) ContainersFilters

type DeadContainer

type DeadContainer struct {
	TTL      int
	Services []*Service
}

type RegistryAdapter

type RegistryAdapter interface {
	Ping() error
	Register(service *Service) error
	Deregister(service *Service) error
	SetupHealthCheck(service *Service, healthCheck *TtlHealthCheck) error
	Refresh(service *Service) error
	Services() ([]*Service, error)
}

type Service

type Service struct {
	ID    string
	Name  string
	Port  int
	IP    string
	Tags  []string
	Attrs map[string]string
	TTL   int

	Origin ServicePort
}

type ServicePort

type ServicePort struct {
	HostPort          string
	HostIP            string
	ExposedPort       string
	ExposedIP         string
	PortType          string
	ContainerHostname string
	ContainerID       string
	ContainerName     string
	// contains filtered or unexported fields
}

type TtlHealthCheck

type TtlHealthCheck struct {
	TTL         int
	CheckStatus string
}

Jump to

Keyboard shortcuts

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