hostindex

package
v0.0.0-...-e3289a9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTTLString string = "60s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	GetAddress() net.IP
	GetLastUpdateTime() time.Time
	ResetExpiration()
}

func NewBackend

func NewBackend(address net.IP) Backend

type Host

type Host interface {
	GetHostname() string
	AddBackend(Backend) bool
	GetBackends() []Backend
	RemoveBackend(Backend) bool
	UpdateTTL(time.Duration)
	GetTTL() time.Duration
}

func NewHost

func NewHost(hostname string) Host

type HostIndex

type HostIndex interface {
	UpdateHost(Host)
	RemoveHost(Host)
	GetHostByHostname(string) Host
	GetAllHosts() []Host
}

func NewHostIndex

func NewHostIndex() HostIndex

Jump to

Keyboard shortcuts

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