servers

package
v0.0.0-...-19bb427 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService() (s *utils.Service)

NewService creates a new service

func StartServer

func StartServer(rawParams []string)

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(service utils.Service)

AddService adds a new container and thus new DNS records

func (*DNSServer) DNSExchange

func (s *DNSServer) DNSExchange(nameservers string, r *dns.Msg) (*dns.Msg, []dns.RR, error)

func (*DNSServer) GetAllServices

func (s *DNSServer) GetAllServices() []utils.Service

func (*DNSServer) GetService

func (s *DNSServer) GetService(service utils.Service) ([]utils.Service, error)

GetService reads a service from the repository

func (*DNSServer) MakePrivateRR

func (s *DNSServer) MakePrivateRR(query string, qtype uint16, m *dns.Msg)

func (*DNSServer) RemoveService

func (s *DNSServer) RemoveService(service utils.Service) 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 ServiceListProvider

type ServiceListProvider interface {
	AddService(utils.Service)
	RemoveService(utils.Service) error
	//SetService(utils.Service, utils.Service) error
	GetService(utils.Service) ([]utils.Service, error)
	GetAllServices() []utils.Service
}

ServiceListProvider represents the entrypoint to get containers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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