storage

package
v0.0.0-...-4d64e5c Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataHandler

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

func NewDataHandler

func NewDataHandler(config *DataHandlerConfig) *DataHandler

func (*DataHandler) A

func (dh *DataHandler) A(zone string, label string) (*types.IP_RRSet, error)

func (*DataHandler) AAAA

func (dh *DataHandler) AAAA(zone string, label string) (*types.IP_RRSet, error)

func (*DataHandler) ANAME

func (dh *DataHandler) ANAME(zone string, label string) (*types.ANAME_RRSet, error)

func (*DataHandler) CAA

func (dh *DataHandler) CAA(zone string, label string) (*types.CAA_RRSet, error)

func (*DataHandler) CNAME

func (dh *DataHandler) CNAME(zone string, label string) (*types.CNAME_RRSet, error)

func (*DataHandler) Clear

func (dh *DataHandler) Clear() error

func (*DataHandler) DS

func (dh *DataHandler) DS(zone string, label string) (*types.DS_RRSet, error)

func (*DataHandler) DisableLocation

func (dh *DataHandler) DisableLocation(zone string, location string) error

func (*DataHandler) DisableZone

func (dh *DataHandler) DisableZone(zone string) error

func (*DataHandler) EnableLocation

func (dh *DataHandler) EnableLocation(zone string, location string) error

func (*DataHandler) EnableZone

func (dh *DataHandler) EnableZone(zone string) error

func (*DataHandler) FindZone

func (dh *DataHandler) FindZone(qname string) string

func (*DataHandler) GetZone

func (dh *DataHandler) GetZone(zone string) *types.Zone

func (*DataHandler) GetZoneConfig

func (dh *DataHandler) GetZoneConfig(zone string) (*types.ZoneConfig, error)

func (*DataHandler) GetZoneLocations

func (dh *DataHandler) GetZoneLocations(zone string) []string

func (*DataHandler) GetZones

func (dh *DataHandler) GetZones() []string

func (*DataHandler) LoadZones

func (dh *DataHandler) LoadZones()

TODO: make this function internal

func (*DataHandler) MX

func (dh *DataHandler) MX(zone string, label string) (*types.MX_RRSet, error)

func (*DataHandler) NS

func (dh *DataHandler) NS(zone string, label string) (*types.NS_RRSet, error)

func (*DataHandler) PTR

func (dh *DataHandler) PTR(zone string, label string) (*types.PTR_RRSet, error)

func (*DataHandler) SRV

func (dh *DataHandler) SRV(zone string, label string) (*types.SRV_RRSet, error)

func (*DataHandler) SetLocationFromJson

func (dh *DataHandler) SetLocationFromJson(zone string, location string, value string) error

func (*DataHandler) SetRRSet

func (dh *DataHandler) SetRRSet(zone string, label string, rtype uint16, rrset types.RRSet) error

func (*DataHandler) SetRRSetFromJson

func (dh *DataHandler) SetRRSetFromJson(zone string, label string, rtype uint16, value string) error

func (*DataHandler) SetZoneConfig

func (dh *DataHandler) SetZoneConfig(zone string, config *types.ZoneConfig) error

func (*DataHandler) SetZoneConfigFromJson

func (dh *DataHandler) SetZoneConfigFromJson(zone string, config string) error

func (*DataHandler) SetZoneKey

func (dh *DataHandler) SetZoneKey(zone string, keyType string, pub string, priv string) error

func (*DataHandler) ShutDown

func (dh *DataHandler) ShutDown()

func (*DataHandler) TLSA

func (dh *DataHandler) TLSA(zone string, label string) (*types.TLSA_RRSet, error)

func (*DataHandler) TXT

func (dh *DataHandler) TXT(zone string, label string) (*types.TXT_RRSet, error)

type DataHandlerConfig

type DataHandlerConfig struct {
	ZoneCacheSize      int            `json:"zone_cache_size"`
	ZoneCacheTimeout   int64          `json:"zone_cache_timeout"`
	ZoneReload         int            `json:"zone_reload"`
	RecordCacheSize    int            `json:"record_cache_size"`
	RecordCacheTimeout int64          `json:"record_cache_timeout"`
	Redis              hiredis.Config `json:"redis"`
	MinTTL             uint32         `json:"min_ttl,default:5"`
	MaxTTL             uint32         `json:"max_ttl,default:3600"`
}

type StatHandler

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

func NewStatHandler

func NewStatHandler(config *StatHandlerConfig) *StatHandler

func (StatHandler) Clear

func (sh StatHandler) Clear() error

func (*StatHandler) GetActiveHealthcheckItems

func (sh *StatHandler) GetActiveHealthcheckItems() ([]string, error)

func (*StatHandler) GetHealthStatus

func (sh *StatHandler) GetHealthStatus(domain string, ip string) int

func (*StatHandler) GetHealthcheckItem

func (sh *StatHandler) GetHealthcheckItem(key string) (*types.HealthCheckItem, error)

func (*StatHandler) SetHealthcheckItem

func (sh *StatHandler) SetHealthcheckItem(item *types.HealthCheckItem) error

func (*StatHandler) SetHealthcheckItemExpiration

func (sh *StatHandler) SetHealthcheckItemExpiration(key string, lifespan time.Duration) error

func (*StatHandler) ShutDown

func (sh *StatHandler) ShutDown()

type StatHandlerConfig

type StatHandlerConfig struct {
	Redis hiredis.Config `json:"redis"`
}

Jump to

Keyboard shortcuts

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