Documentation ¶
Index ¶
- Constants
- type BadDnssecProvider
- type DnscheckHandler
- type NameProperties
- type Options
- type SimpleWatcherHub
- func (s *SimpleWatcherHub) IsRegistered(watcherId string) bool
- func (s *SimpleWatcherHub) Register(watcherId string, watcher Watcher) error
- func (s *SimpleWatcherHub) Send(watcherId string, req *dns.Msg, remoteAddr net.Addr, ...)
- func (s *SimpleWatcherHub) Size() int
- func (s *SimpleWatcherHub) Unregister(watcherId string)
- type Watcher
- type WatcherHub
- type WebsocketHandler
- type WebsocketWatcher
- type WebsocketWatcherMessage
Constants ¶
View Source
const ( // if buffer is full, additional dns requests will not be sent to the watcher WebsocketWatcherBufferLength = 500 WebsocketWatcherMaxLife = 2 * time.Minute WebsocketCloseWait = time.Second WebsocketWriteWait = time.Second )
View Source
const TxtFillString = "0000000000000000000000000000000000000000000000000000000000000000000000000" +
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" +
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadDnssecProvider ¶
type BadDnssecProvider struct { KeyTagOverride uint16 *dnsutil.DnssecProvider }
type DnscheckHandler ¶
type DnscheckHandler struct { Zone string Ns []string HostMasterMbox string Addrs []net.IP ChallengeTarget string LargeResponseLimiter *rate.Limiter Watchers WatcherHub BadDnssecProvider *BadDnssecProvider *dnsutil.DnssecProvider }
func (*DnscheckHandler) Init ¶
func (h *DnscheckHandler) Init(privKeyBytes []byte) *DnscheckHandler
func (*DnscheckHandler) ParseName ¶
func (h *DnscheckHandler) ParseName(name string) *NameProperties
func (*DnscheckHandler) ServeDNS ¶
func (h *DnscheckHandler) ServeDNS(w dns.ResponseWriter, req *dns.Msg)
type NameProperties ¶
type Options ¶
type Options struct { // Random string // hex Watch bool Compress bool Truncate bool NoTruncate bool // Rcode int NoReply bool NullIP bool // Padding int // 1 - 4000 TxtFill int // 1 - 4000 // IPv4Only bool IPv6Only bool // NoSig bool BadSig bool ExpiredSig int // 1 - 99999999; default 86400 }
func (*Options) ParseOptions ¶
type SimpleWatcherHub ¶
type SimpleWatcherHub struct { MaxSize int // contains filtered or unexported fields }
func (*SimpleWatcherHub) IsRegistered ¶
func (s *SimpleWatcherHub) IsRegistered(watcherId string) bool
func (*SimpleWatcherHub) Register ¶
func (s *SimpleWatcherHub) Register(watcherId string, watcher Watcher) error
func (*SimpleWatcherHub) Send ¶
func (s *SimpleWatcherHub) Send(watcherId string, req *dns.Msg, remoteAddr net.Addr, connState *tls.ConnectionState)
func (*SimpleWatcherHub) Size ¶
func (s *SimpleWatcherHub) Size() int
func (*SimpleWatcherHub) Unregister ¶
func (s *SimpleWatcherHub) Unregister(watcherId string)
type WatcherHub ¶
type WebsocketHandler ¶
type WebsocketHandler struct { // PathRegex must fully validate the path and capture the watcher key PathRegex *regexp.Regexp *websocket.Upgrader WatcherHub }
func (*WebsocketHandler) ServeHTTP ¶
func (h *WebsocketHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type WebsocketWatcher ¶
type WebsocketWatcher struct {
// contains filtered or unexported fields
}
func NewWebsocketWatcher ¶
func NewWebsocketWatcher() *WebsocketWatcher
func (*WebsocketWatcher) Send ¶
func (ws *WebsocketWatcher) Send(req *dns.Msg, remoteAddr net.Addr, connState *tls.ConnectionState)
type WebsocketWatcherMessage ¶
type WebsocketWatcherMessage struct {
// contains filtered or unexported fields
}
func (*WebsocketWatcherMessage) MarshalJSON ¶
func (msg *WebsocketWatcherMessage) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.