Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StoreConfig ¶
StoreConfig stores server configuration
Types ¶
type Caches ¶
type Caches struct { //connCache stores connections of this server. It is not guaranteed that a returned connection is still active. ConnCache cache.Connection //capabilities stores known hashes of capabilities and for each connInfo what capability the communication partner has. Capabilities cache.Capability //zoneKeyCache is used to store public keys of zones and a pointer to assertions containing them. ZoneKeyCache cache.ZonePublicKey //pendingSignatures contains all sections that are waiting for a delegation query to arrive such that their signatures can be verified. PendingKeys cache.PendingKey //pendingQueries contains a mapping from all self issued pending queries to the set of message bodies waiting for it. PendingQueries cache.PendingQuery //assertionCache contains a set of valid assertions where some of them might be expired. //An entry is marked as extrenal if it might be evicted by a LRU caching strategy. AssertionsCache cache.Assertion //negAssertionCache contains for each zone and context an interval tree to find all shards and zones containing a specific assertion //for a zone the range is infinit: range "","" //for a shard the range is given as declared in the section. //An entry is marked as extrenal if it might be evicted by a LRU caching strategy. NegAssertionCache cache.NegativeAssertion }
type Config ¶
type Config struct { //general RootZonePublicKeyPath string AssertionCheckPointInterval time.Duration //in seconds NegAssertionCheckPointInterval time.Duration //in seconds ZoneKeyCheckPointInterval time.Duration //in seconds CheckPointPath string PreLoadCaches bool //switchboard ServerAddress connection.Info MaxConnections int KeepAlivePeriod time.Duration //in seconds TCPTimeout time.Duration //in seconds TLSCertificateFile string TLSPrivateKeyFile string //inbox PrioBufferSize int NormalBufferSize int NotificationBufferSize int PrioWorkerCount int NormalWorkerCount int NotificationWorkerCount int CapabilitiesCacheSize int Capabilities []message.Capability //verify ZoneKeyCacheSize int ZoneKeyCacheWarnSize int MaxPublicKeysPerZone int PendingKeyCacheSize int DelegationQueryValidity time.Duration //in seconds ReapZoneKeyCacheInterval time.Duration //in seconds ReapPendingKeyCacheInterval time.Duration //in seconds //engine AssertionCacheSize int NegativeAssertionCacheSize int PendingQueryCacheSize int QueryValidity time.Duration //in seconds Authorities []ZoneContext MaxCacheValidity util.MaxCacheValidity //in hours ReapAssertionCacheInterval time.Duration //in seconds ReapNegAssertionCacheInterval time.Duration //in seconds ReapPendingQCacheInterval time.Duration //in seconds }
Config lists possible configurations of a rains server
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig return the default configuration for the zone publisher.
func LoadConfig ¶
LoadConfig loads server configuration
type InputQueues ¶
type InputQueues struct { //incoming messages are buffered in one of these channels until they get processed by a worker //go routine the prioChannel only contains incoming sections in response to a delegation query //issued by this server. Prio chan util.MsgSectionSender Normal chan util.MsgSectionSender Notify chan util.MsgSectionSender //These channels limit the number of go routines working on the different queues to avoid memory //exhaustion. PrioW chan struct{} NormalW chan struct{} NotifyW chan struct{} }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a rainsd server instance.
func New ¶
New returns a pointer to a newly created rainsd server instance with the given config. The server logs with the provided level of logging.
func (*Server) SetResolver ¶
func (s *Server) SetResolver(resolver *libresolve.Resolver)
SetResolver adds a resolver which can forward or recursively resolve queries for this server
type ZoneContext ¶
ZoneContext stores a context and a zone
Click to show internal directories.
Click to hide internal directories.