Documentation ¶
Index ¶
- Variables
- type AnswersCacheStore
- type AnswersCacheStoreData
- type DNSRecord
- type GroupStore
- type GroupStoreData
- func (b *GroupStoreData) ClearData()
- func (b *GroupStoreData) FromPersistentData(persistent GroupStorePersistent)
- func (b *GroupStoreData) Get(key string) ([]DNSRecord, rErrrors.Error)
- func (b *GroupStoreData) GetDomains() []string
- func (b *GroupStoreData) GetForwarders() []net.UDPAddr
- func (b *GroupStoreData) GetGroup() string
- func (b *GroupStoreData) Keys() []string
- func (b *GroupStoreData) PersistentData() GroupStorePersistent
- func (b *GroupStoreData) Remove(key string) rErrrors.Error
- func (b *GroupStoreData) Replace(key string, records []DNSRecord) rErrrors.Error
- func (b *GroupStoreData) Set(key string, record DNSRecord) rErrrors.Error
- type GroupStoreMeta
- type GroupStorePersistent
- type GroupsStore
- type GroupsStoreData
- func (b *GroupsStoreData) Get(key string) (GroupStore, rErrrors.Error)
- func (b *GroupsStoreData) GetAllByDomain(domain string) ([]GroupStore, rErrrors.Error)
- func (b *GroupsStoreData) GetByGroup(group string) (GroupStore, string, rErrrors.Error)
- func (b *GroupsStoreData) GetFirstByDomain(domain string) (GroupStore, string, rErrrors.Error)
- func (b *GroupsStoreData) Keys() []string
- func (b *GroupsStoreData) Remove(key string) rErrrors.Error
- func (b *GroupsStoreData) Set(key string, store GroupStore) rErrrors.Error
- func (b *GroupsStoreData) Trim() error
- type RequestsCacheStore
- type RequestsCacheStoreData
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_ANSWER_TIME_TO_LIVE time.Duration = 5 * time.Minute
View Source
var DEFAULT_GROUP_CACHE_TIME_TO_LIVE time.Duration = 5 * time.Minute
Functions ¶
This section is empty.
Types ¶
type AnswersCacheStore ¶
type AnswersCacheStore interface { Get(key string) ([]dnsmessage.Resource, rErrrors.Error) Set(key string, log ...dnsmessage.Resource) rErrrors.Error Remove(key string) rErrrors.Error Trim() rErrrors.Error }
func NewAnswersCacheStore ¶
func NewAnswersCacheStore() AnswersCacheStore
type AnswersCacheStoreData ¶
func (*AnswersCacheStoreData) Get ¶
func (b *AnswersCacheStoreData) Get(key string) ([]dnsmessage.Resource, rErrrors.Error)
func (*AnswersCacheStoreData) Remove ¶
func (b *AnswersCacheStoreData) Remove(key string) rErrrors.Error
func (*AnswersCacheStoreData) Set ¶
func (b *AnswersCacheStoreData) Set(key string, log ...dnsmessage.Resource) rErrrors.Error
func (*AnswersCacheStoreData) Trim ¶
func (b *AnswersCacheStoreData) Trim() rErrrors.Error
type GroupStore ¶
type GroupStore interface { // Gets all keys Keys() []string // Gets Records for a key Get(key string) ([]DNSRecord, rErrrors.Error) // Sets New Record for a key Set(key string, record DNSRecord) rErrrors.Error // Remove Records for a key Remove(key string) rErrrors.Error // Retrieve group name GetGroup() string // Retrieve references domains GetDomains() []string // Retrieve store name forwarders GetForwarders() []net.UDPAddr //Remove all records in the store ClearData() }
This represent a single zone key store One server key can match more records ...
func NewGroupStore ¶
func NewGroupStore(groupName string, domains []string, forwarders []net.UDPAddr) GroupStore
Generate New _zone Records Store
type GroupStoreData ¶
type GroupStoreData struct { sync.RWMutex GroupName string Domains []string Forwarders []net.UDPAddr // contains filtered or unexported fields }
func (*GroupStoreData) ClearData ¶
func (b *GroupStoreData) ClearData()
func (*GroupStoreData) FromPersistentData ¶
func (b *GroupStoreData) FromPersistentData(persistent GroupStorePersistent)
func (*GroupStoreData) GetDomains ¶
func (b *GroupStoreData) GetDomains() []string
func (*GroupStoreData) GetForwarders ¶
func (b *GroupStoreData) GetForwarders() []net.UDPAddr
func (*GroupStoreData) GetGroup ¶
func (b *GroupStoreData) GetGroup() string
func (*GroupStoreData) Keys ¶
func (b *GroupStoreData) Keys() []string
func (*GroupStoreData) PersistentData ¶
func (b *GroupStoreData) PersistentData() GroupStorePersistent
type GroupStoreMeta ¶
type GroupStoreMeta struct { Store GroupStore Created time.Time TTL time.Duration }
func (GroupStoreMeta) IsValid ¶
func (gsm GroupStoreMeta) IsValid() bool
type GroupStorePersistent ¶
type GroupsStore ¶
type GroupsStore interface { // Retrieves a _zone storage by zone key Get(key string) (GroupStore, rErrrors.Error) // Retrieves a group storage and zone id by zone name GetByGroup(zone string) (GroupStore, string, rErrrors.Error) // Retrieves a group storage list matching on a given domain GetFirstByDomain(domain string) (GroupStore, string, rErrrors.Error) // Replaces a _zone storage by key Set(key string, addr GroupStore) rErrrors.Error // Remove entire sone Remove(key string) rErrrors.Error // Get Zone Keys Keys() []string // Removes expired groups Trim() error }
Defines the behaviour od a multi-zone tenant storage
func NewGroupsStore ¶
func NewGroupsStore() GroupsStore
type GroupsStoreData ¶
func (*GroupsStoreData) Get ¶
func (b *GroupsStoreData) Get(key string) (GroupStore, rErrrors.Error)
func (*GroupsStoreData) GetAllByDomain ¶
func (b *GroupsStoreData) GetAllByDomain(domain string) ([]GroupStore, rErrrors.Error)
func (*GroupsStoreData) GetByGroup ¶
func (b *GroupsStoreData) GetByGroup(group string) (GroupStore, string, rErrrors.Error)
func (*GroupsStoreData) GetFirstByDomain ¶
func (b *GroupsStoreData) GetFirstByDomain(domain string) (GroupStore, string, rErrrors.Error)
func (*GroupsStoreData) Keys ¶
func (b *GroupsStoreData) Keys() []string
func (*GroupsStoreData) Set ¶
func (b *GroupsStoreData) Set(key string, store GroupStore) rErrrors.Error
func (*GroupsStoreData) Trim ¶
func (b *GroupsStoreData) Trim() error
type RequestsCacheStore ¶
type RequestsCacheStore interface { Get(key string) ([]net.UDPAddr, rErrrors.Error) Set(key string, log net.UDPAddr) rErrrors.Error Remove(key string) rErrrors.Error }
func NewRequestsCacheStore ¶
func NewRequestsCacheStore() RequestsCacheStore
type RequestsCacheStoreData ¶
Click to show internal directories.
Click to hide internal directories.