Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
func NewBroadcaster ¶
func NewBroadcaster(logger *slog.Logger) *Broadcaster
func (*Broadcaster) Broadcast ¶
func (b *Broadcaster) Broadcast(event Event)
func (*Broadcaster) Subscribe ¶
func (b *Broadcaster) Subscribe() chan Event
func (*Broadcaster) Unsubscribe ¶
func (b *Broadcaster) Unsubscribe(ch chan Event)
type Event ¶
type Event struct {
Timestamp time.Time `json:"ts"`
Sequence uint64 `json:"seq"`
QueryType string `json:"queryType"`
Domain string `json:"domain"`
Result string `json:"result"`
ClientIP string `json:"ip"`
Source string `json:"src"`
Blocked bool `json:"blocked"`
Cached bool `json:"cached"`
Cause string `json:"cause,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.