bridge

package
v0.0.0-...-5537354 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 18 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 *client.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) Sync

func (b *Bridge) Sync(quiet bool)

type Config

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

type DeadContainer

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

type RegistryAdapter

type RegistryAdapter interface {
	Ping() error
	Register(service *Service) error
	Deregister(service *Service) 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
	ExposedPortProtocol string
	ContainerHostname   string
	ContainerID         string
	ContainerName       string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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