Documentation
¶
Index ¶
Constants ¶
View Source
const PluginName string = "dnslogging"
PluginName is the name of our plugin
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Publish takes a request and publishes it to the streaming service, this should ideally be batching for performance, but that is left to programmer. Publish(req *dns.Msg, resp *dns.Msg) error }
Client is the interface that other stremaing clients must implement to be used.
type DNSLogging ¶
DNSLogging is our plugin struct. No configurations being persisted at this time
func (*DNSLogging) Close ¶
func (dl *DNSLogging) Close()
Close will drain and close of the nats connection
func (*DNSLogging) Initialize ¶
func (dl *DNSLogging) Initialize() (err error)
Initialize handles the initial connection to the nats server.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error type for the dns logging plugin
type KafkaClient ¶
type KafkaClient struct {
// contains filtered or unexported fields
}
KafkaClient contains a kafka writer which can be used to async send messages to kafka
func NewKafkaClient ¶
func NewKafkaClient(brokers []string, topic string) (kc *KafkaClient, err error)
NewKafkaClient creates a kafka client for the plugin to publish to
func (*KafkaClient) Publish ¶
func (kc *KafkaClient) Publish(log *Log) (err error)
Publish sends a log object to kafka
type NatsClient ¶
type NatsClient struct {
// contains filtered or unexported fields
}
func NewNatsClient ¶
func NewNatsClient(natsURL string) (_ *NatsClient, err error)
NewNatsClient returns a connected Nats Client
func (*NatsClient) Publish ¶
func (nc *NatsClient) Publish(log *Log) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.