servers

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSServer

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

DNSServer represents a DNS server

func NewDNSServer

func NewDNSServer(c *utils.Config) *DNSServer

NewDNSServer create a new DNSServer

func (*DNSServer) AddService

func (s *DNSServer) AddService(id string, service Service)

AddService adds a new container and thus new DNS records

func (*DNSServer) GetAllServices

func (s *DNSServer) GetAllServices() map[string]Service

GetAllServices reads all services from the repository

func (*DNSServer) GetService

func (s *DNSServer) GetService(id string) (Service, error)

GetService reads a service from the repository

func (*DNSServer) RemoveService

func (s *DNSServer) RemoveService(id string) error

RemoveService removes a new container and thus DNS records

func (*DNSServer) Start

func (s *DNSServer) Start() error

Start starts the DNSServer

func (*DNSServer) Stop

func (s *DNSServer) Stop()

Stop stops the DNSServer

type HTTPServer

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

HTTPServer represents the http endpoint

func NewHTTPServer

func NewHTTPServer(c *utils.Config, list ServiceListProvider) *HTTPServer

NewHTTPServer create a new http endpoint

func (*HTTPServer) Start

func (s *HTTPServer) Start() error

Start starts the http endpoint

type Service

type Service struct {
	Name    string
	Image   string
	IPs     []net.IP
	TTL     int
	Aliases []string
}

Service represents a container and an attached DNS record

func NewService

func NewService() (s *Service)

NewService creates a new service

func (Service) String added in v1.16.3

func (s Service) String() string

type ServiceListProvider

type ServiceListProvider interface {
	AddService(string, Service)
	RemoveService(string) error
	GetService(string) (Service, error)
	GetAllServices() map[string]Service
}

ServiceListProvider represents the entrypoint to get containers

Jump to

Keyboard shortcuts

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