Documentation ¶
Index ¶
- Variables
- func AddServicePlugin(name string, ...) error
- type City
- type Config
- type Continent
- type Country
- type Endpoint
- type Failover
- type FailoverValue
- type Geolocation
- type Multivalue
- type Records
- type Service
- func CreateService(config *Config, path string, v *viper.Viper) (Service, error)
- func NewEndpoint(config *Config, path string, v *viper.Viper) (Service, error)
- func NewFailover(config *Config, path string, v *viper.Viper) (Service, error)
- func NewGeolocation(config *Config, path string, v *viper.Viper) (Service, error)
- func NewMultivalue(config *Config, path string, v *viper.Viper) (Service, error)
- func NewWeight(config *Config, path string, v *viper.Viper) (Service, error)
- type ServiceGenerator
- type Subdivision
- type Weight
- type WeightValue
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrReadService = errors.New("because can't read service file") ErrRRtypeEmpty = errors.New("because RRType is empty") ErrRRTypeNotSupported = errors.New("because RRType is not supported") ErrServiceEmpty = errors.New("because service is empty") )
View Source
var ( ErrEndpointValueEmpty = errors.New("Value is empty") ErrEndpointValueNotString = errors.New("Value is not string") ErrEndpointValueFormatError = errors.New("Value format error") )
View Source
var ( ErrNextEmpty = errors.New("Rule is empty") ErrLocatiosEmpty = errors.New("Location is empty") ErrLocatiosCantUse = errors.New("Location is can't use") ErrLocationsEmpty = errors.New("Locations is empty") ErrGeoip2DBFileEmpty = errors.New("Geoip2DBFile is empty") ErrGeoip2DBCantOpen = errors.New("geodb can't open") ErrDefaultLocationEmpty = errors.New("DEFAULT location is not found") )
View Source
var ( ErrConfigParseError = errors.New("Failed to parse service config.") ErrServiceNotFound = errors.New("Service not found") ErrServiceExist = errors.New("Service is already exist. ") ErrServiceStatusError = errors.New("Monitoring status is failed") )
View Source
var (
ErrSamePriority = errors.New("Can't set same priority.")
)
View Source
var (
ErrZeroWeight = errors.New("Weight value is zero or empty")
)
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string RRType uint16 Service Service Monitors map[*Endpoint]string ModTime time.Time }
func LoadConfig ¶
type Endpoint ¶
type Endpoint struct { Value string RRType uint16 RR dns.RR StatusCh chan bool // contains filtered or unexported fields }
func (*Endpoint) StartStatusWatch ¶
func (*Endpoint) UpdateStatus ¶
func (e *Endpoint) UpdateStatus()
func (*Endpoint) Verify ¶
func (e *Endpoint) Verify(syntaxError *config.SyntaxError)
type Failover ¶
type Failover struct { Values []*FailoverValue Weight uint32 // contains filtered or unexported fields }
func (*Failover) CreateChild ¶
type FailoverValue ¶
type Geolocation ¶
type Geolocation struct { IPv4GeoDB *maxminddb.Reader IPv6GeoDB *maxminddb.Reader Locations map[string]Service // contains filtered or unexported fields }
func (*Geolocation) GetRR ¶
func (g *Geolocation) GetRR(w dns.ResponseWriter, req *dns.Msg) ([]dns.RR, error)
func (*Geolocation) Path ¶
func (g *Geolocation) Path() string
type Multivalue ¶
func (*Multivalue) GetRR ¶
func (m *Multivalue) GetRR(w dns.ResponseWriter, req *dns.Msg) ([]dns.RR, error)
func (*Multivalue) Path ¶
func (m *Multivalue) Path() string
type Records ¶
type Records struct { City City `maxminddb:"city"` Continent Continent `maxminddb:"continent"` Country Country `maxminddb:"country"` Subdivisions []Subdivision `maxminddb:"subdivisions"` }
type ServiceGenerator ¶
type Subdivision ¶
type Weight ¶
type Weight struct { Values map[string]*WeightValue // contains filtered or unexported fields }
func (*Weight) CreateChild ¶
type WeightValue ¶
Click to show internal directories.
Click to hide internal directories.