You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
428 B

package internal
import "context"
var (
LogUpdated = EventType("LOG_UPDATE")
DNSLog = EventSource("DNS_LOG")
)
type EventType string
type EventSource string
type Event struct {
Type EventType `json:"type"`
Source EventSource `json:"source"`
Payload interface{} `json:"payload"`
}
type EventPublisher interface {
Publish(Event)
}
type EventSubscriber interface {
Subscribe(context.Context) <-chan Event
}