Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthorizer ¶
func NewAuthorizer( ttl, ttlCheckTicker int, authorizedSet string, blacklistHosts, blacklistNetworks []string, doNotFlushAuthorizedHosts bool, fw *firewall.Firewall, logger *logrus.Logger) (*Authorizer, *ServiceContext, error)
NewAuthorizer for creating a new Authorizer
Types ¶
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
Authorizer for managing firewall rules
func (*Authorizer) HandleRequest ¶
func (f *Authorizer) HandleRequest(resp *dns.Msg) error
HandleRequest for filtering dns respone requests
type ServiceContext ¶
type ServiceContext struct {
// contains filtered or unexported fields
}
ServiceContext for canceling goroutins
func (*ServiceContext) Expire ¶
func (f *ServiceContext) Expire()
Expire will call cancel to terminate a context immediately, causing the goroutine to exit
func (*ServiceContext) Wait ¶
func (f *ServiceContext) Wait()
Wait ensures that the goroutine has exit successfully
Click to show internal directories.
Click to hide internal directories.