loggers

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPriority

func GetPriority(facility string) (syslog.Priority, error)

func SanitizeMetricName added in v0.22.0

func SanitizeMetricName(metricName string) string

OpenMetrics and the Prometheus exposition format require the metric name to consist only of alphanumericals and "_", ":" and they must not start with digits.

Types

type Counters added in v0.21.0

type Counters struct {
	Pps              uint64
	PpsMax           uint64
	Packets          uint64
	PacketsPrev      uint64
	PacketsMalformed uint64

	Qps         uint64
	QpsMax      uint64
	Queries     uint64
	QueriesPrev uint64

	Latency0_1      uint64
	Latency1_10     uint64
	Latency10_50    uint64
	Latency50_100   uint64
	Latency100_500  uint64
	Latency500_1000 uint64
	Latency1000_inf uint64
	LatencyMax      float64
	LatencyMin      float64

	QnameLength0_10    int
	QnameLength10_20   int
	QnameLength20_40   int
	QnameLength40_60   int
	QnameLength60_100  int
	QnameLength100_Inf int
	QnameLengthMax     int
	QnameLengthMin     int

	QueryLength0_50    int
	QueryLength50_100  int
	QueryLength100_250 int
	QueryLength250_500 int
	QueryLength500_Inf int
	QueryLengthMax     int
	QueryLengthMin     int

	ReplyLength0_50    int
	ReplyLength50_100  int
	ReplyLength100_250 int
	ReplyLength250_500 int
	ReplyLength500_Inf int
	ReplyLengthMax     int
	ReplyLengthMin     int

	ReceivedBytesTotal int
	SentBytesTotal     int

	Truncated           int
	AuthoritativeAnswer int
	RecursionAvailable  int
	AuthenticData       int
}

type DnstapSender

type DnstapSender struct {
	// contains filtered or unexported fields
}

func NewDnstapSender

func NewDnstapSender(config *dnsutils.Config, logger *logger.Logger, name string) *DnstapSender

func (*DnstapSender) Channel

func (o *DnstapSender) Channel() chan dnsutils.DnsMessage

func (*DnstapSender) GetName added in v0.22.0

func (c *DnstapSender) GetName() string

func (*DnstapSender) LogError

func (o *DnstapSender) LogError(msg string, v ...interface{})

func (*DnstapSender) LogInfo

func (o *DnstapSender) LogInfo(msg string, v ...interface{})

func (*DnstapSender) ReadConfig

func (o *DnstapSender) ReadConfig()

func (*DnstapSender) Run

func (o *DnstapSender) Run()

func (*DnstapSender) SetLoggers added in v0.22.0

func (c *DnstapSender) SetLoggers(loggers []dnsutils.Worker)

func (*DnstapSender) Stop

func (o *DnstapSender) Stop()

type ElasticSearchClient added in v0.23.0

type ElasticSearchClient struct {
	// contains filtered or unexported fields
}

func NewElasticSearchClient added in v0.23.0

func NewElasticSearchClient(config *dnsutils.Config, console *logger.Logger, name string) *ElasticSearchClient

func (*ElasticSearchClient) Channel added in v0.23.0

func (o *ElasticSearchClient) Channel() chan dnsutils.DnsMessage

func (*ElasticSearchClient) GetName added in v0.23.0

func (c *ElasticSearchClient) GetName() string

func (*ElasticSearchClient) LogError added in v0.23.0

func (o *ElasticSearchClient) LogError(msg string, v ...interface{})

func (*ElasticSearchClient) LogInfo added in v0.23.0

func (o *ElasticSearchClient) LogInfo(msg string, v ...interface{})

func (*ElasticSearchClient) ReadConfig added in v0.23.0

func (c *ElasticSearchClient) ReadConfig()

func (*ElasticSearchClient) Run added in v0.23.0

func (o *ElasticSearchClient) Run()

func (*ElasticSearchClient) SetLoggers added in v0.23.0

func (c *ElasticSearchClient) SetLoggers(loggers []dnsutils.Worker)

func (*ElasticSearchClient) Stop added in v0.23.0

func (o *ElasticSearchClient) Stop()

type ElasticSearchData added in v0.23.0

type ElasticSearchData struct {
	Identity  string `json:"identity"`
	QueryIP   string `json:"query_ip"`
	QName     string `json:"q_name"`
	Operation string `json:"operation"`
	Family    string `json:"family"`
	Protocol  string `json:"protocol"`
	QType     string `json:"q_type"`
	RCode     string `json:"r_code"`
	TimeStamp int64  `json:"timestamp"`
}

type EpsCounters added in v0.22.0

type EpsCounters struct {
	Eps             uint64
	EpsMax          uint64
	TotalEvents     uint64
	TotalEventsPrev uint64
}

type FakeLogger

type FakeLogger struct {
	// contains filtered or unexported fields
}

func NewFakeLogger

func NewFakeLogger() *FakeLogger

func (*FakeLogger) Channel

func (o *FakeLogger) Channel() chan dnsutils.DnsMessage

func (*FakeLogger) GetName added in v0.22.0

func (c *FakeLogger) GetName() string

func (*FakeLogger) ReadConfig added in v0.16.0

func (o *FakeLogger) ReadConfig()

func (*FakeLogger) Run

func (o *FakeLogger) Run()

func (*FakeLogger) SetLoggers added in v0.22.0

func (c *FakeLogger) SetLoggers(loggers []dnsutils.Worker)

func (*FakeLogger) Stop

func (o *FakeLogger) Stop()

type FluentdClient

type FluentdClient struct {
	// contains filtered or unexported fields
}

func NewFluentdClient

func NewFluentdClient(config *dnsutils.Config, logger *logger.Logger, name string) *FluentdClient

func (*FluentdClient) Channel

func (o *FluentdClient) Channel() chan dnsutils.DnsMessage

func (*FluentdClient) GetName added in v0.22.0

func (c *FluentdClient) GetName() string

func (*FluentdClient) LogError

func (o *FluentdClient) LogError(msg string, v ...interface{})

func (*FluentdClient) LogInfo

func (o *FluentdClient) LogInfo(msg string, v ...interface{})

func (*FluentdClient) ReadConfig

func (o *FluentdClient) ReadConfig()

func (*FluentdClient) Run

func (o *FluentdClient) Run()

func (*FluentdClient) SetLoggers added in v0.22.0

func (c *FluentdClient) SetLoggers(loggers []dnsutils.Worker)

func (*FluentdClient) Stop

func (o *FluentdClient) Stop()

type InfluxDBClient added in v0.13.0

type InfluxDBClient struct {
	// contains filtered or unexported fields
}

func NewInfluxDBClient added in v0.13.0

func NewInfluxDBClient(config *dnsutils.Config, logger *logger.Logger, name string) *InfluxDBClient

func (*InfluxDBClient) Channel added in v0.13.0

func (o *InfluxDBClient) Channel() chan dnsutils.DnsMessage

func (*InfluxDBClient) GetName added in v0.22.0

func (c *InfluxDBClient) GetName() string

func (*InfluxDBClient) LogError added in v0.13.0

func (o *InfluxDBClient) LogError(msg string, v ...interface{})

func (*InfluxDBClient) LogInfo added in v0.13.0

func (o *InfluxDBClient) LogInfo(msg string, v ...interface{})

func (*InfluxDBClient) ReadConfig added in v0.13.0

func (o *InfluxDBClient) ReadConfig()

func (*InfluxDBClient) Run added in v0.13.0

func (o *InfluxDBClient) Run()

func (*InfluxDBClient) SetLoggers added in v0.22.0

func (c *InfluxDBClient) SetLoggers(loggers []dnsutils.Worker)

func (*InfluxDBClient) Stop added in v0.13.0

func (o *InfluxDBClient) Stop()

type LogFile

type LogFile struct {
	// contains filtered or unexported fields
}

func NewLogFile

func NewLogFile(config *dnsutils.Config, logger *logger.Logger, name string) *LogFile

func (*LogFile) Channel

func (o *LogFile) Channel() chan dnsutils.DnsMessage

func (*LogFile) Cleanup added in v0.5.0

func (o *LogFile) Cleanup() error

func (*LogFile) Compress added in v0.5.0

func (o *LogFile) Compress()

func (*LogFile) CompressPostRotateCommand added in v0.17.0

func (o *LogFile) CompressPostRotateCommand(filename string)

func (*LogFile) Flush

func (o *LogFile) Flush()

func (*LogFile) GetName added in v0.22.0

func (c *LogFile) GetName() string

func (*LogFile) LogError added in v0.5.0

func (o *LogFile) LogError(msg string, v ...interface{})

func (*LogFile) LogInfo added in v0.5.0

func (o *LogFile) LogInfo(msg string, v ...interface{})

func (*LogFile) MaxSize

func (o *LogFile) MaxSize() int64

func (*LogFile) OpenFile

func (o *LogFile) OpenFile() error

func (*LogFile) PostRotateCommand added in v0.5.0

func (o *LogFile) PostRotateCommand(filename string)

func (*LogFile) ReadConfig

func (c *LogFile) ReadConfig()

func (*LogFile) Rotate

func (o *LogFile) Rotate() error

func (*LogFile) Run

func (o *LogFile) Run()

func (*LogFile) SetLoggers added in v0.22.0

func (c *LogFile) SetLoggers(loggers []dnsutils.Worker)

func (*LogFile) Stop

func (o *LogFile) Stop()

func (*LogFile) Write

func (o *LogFile) Write(d []byte)

type LokiClient added in v0.13.0

type LokiClient struct {
	// contains filtered or unexported fields
}

func NewLokiClient added in v0.13.0

func NewLokiClient(config *dnsutils.Config, logger *logger.Logger, name string) *LokiClient

func (*LokiClient) Channel added in v0.13.0

func (o *LokiClient) Channel() chan dnsutils.DnsMessage

func (*LokiClient) GetName added in v0.22.0

func (c *LokiClient) GetName() string

func (*LokiClient) LogError added in v0.13.0

func (o *LokiClient) LogError(msg string, v ...interface{})

func (*LokiClient) LogInfo added in v0.13.0

func (o *LokiClient) LogInfo(msg string, v ...interface{})

func (*LokiClient) ReadConfig added in v0.13.0

func (o *LokiClient) ReadConfig()

func (*LokiClient) Run added in v0.13.0

func (o *LokiClient) Run()

func (*LokiClient) SendEntries added in v0.13.0

func (o *LokiClient) SendEntries(buf []byte)

func (*LokiClient) SendEntriesOld added in v0.17.0

func (o *LokiClient) SendEntriesOld(buf []byte) error

func (*LokiClient) SetLoggers added in v0.22.0

func (c *LokiClient) SetLoggers(loggers []dnsutils.Worker)

func (*LokiClient) Stop added in v0.13.0

func (o *LokiClient) Stop()

type LokiStream added in v0.17.0

type LokiStream struct {
	// contains filtered or unexported fields
}

func (*LokiStream) Encode2Proto added in v0.17.0

func (o *LokiStream) Encode2Proto() ([]byte, error)

func (*LokiStream) Init added in v0.17.0

func (o *LokiStream) Init()

func (*LokiStream) ResetEntries added in v0.17.0

func (o *LokiStream) ResetEntries()

type PcapWriter

type PcapWriter struct {
	// contains filtered or unexported fields
}

func NewPcapFile

func NewPcapFile(config *dnsutils.Config, console *logger.Logger, name string) *PcapWriter

func (*PcapWriter) Channel

func (o *PcapWriter) Channel() chan dnsutils.DnsMessage

func (*PcapWriter) Cleanup added in v0.5.0

func (o *PcapWriter) Cleanup() error

func (*PcapWriter) Compress added in v0.5.0

func (o *PcapWriter) Compress()

func (*PcapWriter) GetIpPort

func (o *PcapWriter) GetIpPort(dm *dnsutils.DnsMessage) (string, int, string, int)

func (*PcapWriter) GetName added in v0.22.0

func (c *PcapWriter) GetName() string

func (*PcapWriter) LogError

func (o *PcapWriter) LogError(msg string, v ...interface{})

func (*PcapWriter) LogInfo

func (o *PcapWriter) LogInfo(msg string, v ...interface{})

func (*PcapWriter) MaxSize

func (o *PcapWriter) MaxSize() int64

func (*PcapWriter) OpenFile

func (o *PcapWriter) OpenFile() error

func (*PcapWriter) PostRotateCommand added in v0.5.0

func (o *PcapWriter) PostRotateCommand(filename string)

func (*PcapWriter) ReadConfig

func (c *PcapWriter) ReadConfig()

func (*PcapWriter) Rotate

func (o *PcapWriter) Rotate() error

func (*PcapWriter) Run

func (o *PcapWriter) Run()

func (*PcapWriter) SetLoggers added in v0.22.0

func (c *PcapWriter) SetLoggers(loggers []dnsutils.Worker)

func (*PcapWriter) Stop

func (o *PcapWriter) Stop()

func (*PcapWriter) Write

type Prometheus added in v0.15.0

type Prometheus struct {
	// contains filtered or unexported fields
}

func NewPrometheus added in v0.15.0

func NewPrometheus(config *dnsutils.Config, logger *logger.Logger, version string, name string) *Prometheus

func (*Prometheus) Channel added in v0.15.0

func (o *Prometheus) Channel() chan dnsutils.DnsMessage

func (*Prometheus) ComputeEps added in v0.22.0

func (o *Prometheus) ComputeEps()

func (*Prometheus) GetName added in v0.22.0

func (c *Prometheus) GetName() string

func (*Prometheus) InitProm added in v0.15.0

func (o *Prometheus) InitProm()

func (*Prometheus) ListenAndServe added in v0.15.0

func (s *Prometheus) ListenAndServe()

func (*Prometheus) LogError added in v0.15.0

func (o *Prometheus) LogError(msg string, v ...interface{})

func (*Prometheus) LogInfo added in v0.15.0

func (o *Prometheus) LogInfo(msg string, v ...interface{})

func (*Prometheus) ReadConfig added in v0.16.0

func (o *Prometheus) ReadConfig()

func (*Prometheus) Record added in v0.15.0

func (o *Prometheus) Record(dm dnsutils.DnsMessage)

func (*Prometheus) Run added in v0.15.0

func (s *Prometheus) Run()

func (*Prometheus) SetLoggers added in v0.22.0

func (c *Prometheus) SetLoggers(loggers []dnsutils.Worker)

func (*Prometheus) Stop added in v0.15.0

func (o *Prometheus) Stop()

type StatsPerStream added in v0.21.0

type StatsPerStream struct {
	TopMaxItems        int
	ThresholdQnameLen  int
	ThresholdPacketLen int
	ThresholdSlow      float64
	CommonQtypes       []string

	MapHitAS  map[string]int
	MapAS     map[string]string
	ListTopAS *topmap.TopMap

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStatsPerStream added in v0.21.0

func NewStatsPerStream(config *dnsutils.Config, name string, topmaxitems int, maxqnamelen int,
	maxpacketlen int, thresholdslow float64, commonqtypes []string) *StatsPerStream

func (*StatsPerStream) Compute added in v0.21.0

func (c *StatsPerStream) Compute()

func (*StatsPerStream) GetAS added in v0.21.0

func (c *StatsPerStream) GetAS() (ret map[string]string)

func (*StatsPerStream) GetClients added in v0.21.0

func (c *StatsPerStream) GetClients() (ret map[string]int)

func (*StatsPerStream) GetCounters added in v0.21.0

func (c *StatsPerStream) GetCounters() (ret Counters)

func (*StatsPerStream) GetDomains added in v0.21.0

func (c *StatsPerStream) GetDomains() (ret map[string]int)

func (*StatsPerStream) GetHitAS added in v0.21.0

func (c *StatsPerStream) GetHitAS() (ret map[string]int)

func (*StatsPerStream) GetTopAS added in v0.21.0

func (c *StatsPerStream) GetTopAS() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopClients added in v0.21.0

func (c *StatsPerStream) GetTopClients() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopEffectiveTLDPlusOne added in v0.21.0

func (c *StatsPerStream) GetTopEffectiveTLDPlusOne() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopFirstLevelDomains added in v0.21.0

func (c *StatsPerStream) GetTopFirstLevelDomains() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopIpProto added in v0.21.0

func (c *StatsPerStream) GetTopIpProto() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopNxdomains added in v0.21.0

func (c *StatsPerStream) GetTopNxdomains() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopOperations added in v0.21.0

func (c *StatsPerStream) GetTopOperations() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopPublicSuffix added in v0.21.0

func (c *StatsPerStream) GetTopPublicSuffix() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopQnames added in v0.21.0

func (c *StatsPerStream) GetTopQnames() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopRcodes added in v0.21.0

func (c *StatsPerStream) GetTopRcodes() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopRrtypes added in v0.21.0

func (c *StatsPerStream) GetTopRrtypes() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopSlowdomains added in v0.21.0

func (c *StatsPerStream) GetTopSlowdomains() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopSuspiciousClients added in v0.21.0

func (c *StatsPerStream) GetTopSuspiciousClients() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopSuspiciousdomains added in v0.21.0

func (c *StatsPerStream) GetTopSuspiciousdomains() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTopTransports added in v0.21.0

func (c *StatsPerStream) GetTopTransports() (ret []topmap.TopMapItem)

func (*StatsPerStream) GetTotalAS added in v0.21.0

func (c *StatsPerStream) GetTotalAS() (ret int)

func (*StatsPerStream) GetTotalClients added in v0.21.0

func (c *StatsPerStream) GetTotalClients() (ret int)

func (*StatsPerStream) GetTotalDomains added in v0.21.0

func (c *StatsPerStream) GetTotalDomains() (ret int)

func (*StatsPerStream) GetTotalEffectiveTLDPlusOne added in v0.21.0

func (c *StatsPerStream) GetTotalEffectiveTLDPlusOne() (ret int)

func (*StatsPerStream) GetTotalFirstLevelDomains added in v0.21.0

func (c *StatsPerStream) GetTotalFirstLevelDomains() (ret int)

func (*StatsPerStream) GetTotalNxdomains added in v0.21.0

func (c *StatsPerStream) GetTotalNxdomains() (ret int)

func (*StatsPerStream) GetTotalPublicSuffix added in v0.21.0

func (c *StatsPerStream) GetTotalPublicSuffix() (ret int)

func (*StatsPerStream) GetTotalSlowdomains added in v0.21.0

func (c *StatsPerStream) GetTotalSlowdomains() (ret int)

func (*StatsPerStream) GetTotalSuspiciousClients added in v0.21.0

func (c *StatsPerStream) GetTotalSuspiciousClients() (ret int)

func (*StatsPerStream) GetTotalSuspiciousdomains added in v0.21.0

func (c *StatsPerStream) GetTotalSuspiciousdomains() (ret int)

func (*StatsPerStream) ReadConfig added in v0.21.0

func (c *StatsPerStream) ReadConfig()

func (*StatsPerStream) Record added in v0.21.0

func (c *StatsPerStream) Record(dm dnsutils.DnsMessage)

func (*StatsPerStream) Reset added in v0.21.0

func (c *StatsPerStream) Reset()

type StatsStreams added in v0.21.0

type StatsStreams struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStreamsStats added in v0.21.0

func NewStreamsStats(config *dnsutils.Config, version string, prom string, topmaxitems int,
	maxqnamelen int, maxpacketlen int, thresholdslow float64, commonqtypes []string) *StatsStreams

func (*StatsStreams) Compute added in v0.21.0

func (c *StatsStreams) Compute()

func (*StatsStreams) GetAS added in v0.21.0

func (c *StatsStreams) GetAS(identity string) (ret map[string]string)

func (*StatsStreams) GetClients added in v0.21.0

func (c *StatsStreams) GetClients(identity string) (ret map[string]int)

func (*StatsStreams) GetCounters added in v0.21.0

func (c *StatsStreams) GetCounters(identity string) (ret Counters)

func (*StatsStreams) GetDomains added in v0.21.0

func (c *StatsStreams) GetDomains(identity string) (ret map[string]int)

func (*StatsStreams) GetHitAS added in v0.21.0

func (c *StatsStreams) GetHitAS(identity string) (ret map[string]int)

func (*StatsStreams) GetMetrics added in v0.21.0

func (s *StatsStreams) GetMetrics(w http.ResponseWriter, r *http.Request)

func (*StatsStreams) GetTopAS added in v0.21.0

func (c *StatsStreams) GetTopAS(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopClients added in v0.21.0

func (c *StatsStreams) GetTopClients(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopEffectiveTLDPlusOne added in v0.21.0

func (c *StatsStreams) GetTopEffectiveTLDPlusOne(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopFirstLevelDomains added in v0.21.0

func (c *StatsStreams) GetTopFirstLevelDomains(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopIpProto added in v0.21.0

func (c *StatsStreams) GetTopIpProto(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopNxdomains added in v0.21.0

func (c *StatsStreams) GetTopNxdomains(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopOperations added in v0.21.0

func (c *StatsStreams) GetTopOperations(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopPublicSuffix added in v0.21.0

func (c *StatsStreams) GetTopPublicSuffix(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopQnames added in v0.21.0

func (c *StatsStreams) GetTopQnames(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopRcodes added in v0.21.0

func (c *StatsStreams) GetTopRcodes(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopRrtypes added in v0.21.0

func (c *StatsStreams) GetTopRrtypes(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopSlowdomains added in v0.21.0

func (c *StatsStreams) GetTopSlowdomains(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopSuspiciousClients added in v0.21.0

func (c *StatsStreams) GetTopSuspiciousClients(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopSuspiciousdomains added in v0.21.0

func (c *StatsStreams) GetTopSuspiciousdomains(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTopTransports added in v0.21.0

func (c *StatsStreams) GetTopTransports(identity string) (ret []topmap.TopMapItem)

func (*StatsStreams) GetTotalAS added in v0.21.0

func (c *StatsStreams) GetTotalAS(identity string) (ret int)

func (*StatsStreams) GetTotalClients added in v0.21.0

func (c *StatsStreams) GetTotalClients(identity string) (ret int)

func (*StatsStreams) GetTotalDomains added in v0.21.0

func (c *StatsStreams) GetTotalDomains(identity string) (ret int)

func (*StatsStreams) GetTotalEffectiveTLDPlusOne added in v0.21.0

func (c *StatsStreams) GetTotalEffectiveTLDPlusOne(identity string) (ret int)

func (*StatsStreams) GetTotalFirstLevelDomains added in v0.21.0

func (c *StatsStreams) GetTotalFirstLevelDomains(identity string) (ret int)

func (*StatsStreams) GetTotalNxdomains added in v0.21.0

func (c *StatsStreams) GetTotalNxdomains(identity string) (ret int)

func (*StatsStreams) GetTotalPublicSuffix added in v0.21.0

func (c *StatsStreams) GetTotalPublicSuffix(identity string) (ret int)

func (*StatsStreams) GetTotalSlowdomains added in v0.21.0

func (c *StatsStreams) GetTotalSlowdomains(identity string) (ret int)

func (*StatsStreams) GetTotalSuspiciousClients added in v0.21.0

func (c *StatsStreams) GetTotalSuspiciousClients(identity string) (ret int)

func (*StatsStreams) GetTotalSuspiciousdomains added in v0.21.0

func (c *StatsStreams) GetTotalSuspiciousdomains(identity string) (ret int)

func (*StatsStreams) Record added in v0.21.0

func (c *StatsStreams) Record(dm dnsutils.DnsMessage)

func (*StatsStreams) Reset added in v0.21.0

func (c *StatsStreams) Reset(identity string)

func (*StatsStreams) Streams added in v0.21.0

func (c *StatsStreams) Streams() []string

type StatsdClient added in v0.14.0

type StatsdClient struct {
	// contains filtered or unexported fields
}

func NewStatsdClient added in v0.14.0

func NewStatsdClient(config *dnsutils.Config, logger *logger.Logger, version string, name string) *StatsdClient

func (*StatsdClient) Channel added in v0.14.0

func (o *StatsdClient) Channel() chan dnsutils.DnsMessage

func (*StatsdClient) GetName added in v0.22.0

func (c *StatsdClient) GetName() string

func (*StatsdClient) LogError added in v0.14.0

func (o *StatsdClient) LogError(msg string, v ...interface{})

func (*StatsdClient) LogInfo added in v0.14.0

func (o *StatsdClient) LogInfo(msg string, v ...interface{})

func (*StatsdClient) ReadConfig added in v0.14.0

func (o *StatsdClient) ReadConfig()

func (*StatsdClient) Run added in v0.14.0

func (o *StatsdClient) Run()

func (*StatsdClient) SetLoggers added in v0.22.0

func (c *StatsdClient) SetLoggers(loggers []dnsutils.Worker)

func (*StatsdClient) Stop added in v0.14.0

func (o *StatsdClient) Stop()

type StdOut

type StdOut struct {
	// contains filtered or unexported fields
}

func NewStdOut

func NewStdOut(config *dnsutils.Config, console *logger.Logger, name string) *StdOut

func (*StdOut) Channel

func (o *StdOut) Channel() chan dnsutils.DnsMessage

func (*StdOut) GetName added in v0.22.0

func (c *StdOut) GetName() string

func (*StdOut) LogError

func (c *StdOut) LogError(msg string, v ...interface{})

func (*StdOut) LogInfo

func (c *StdOut) LogInfo(msg string, v ...interface{})

func (*StdOut) ReadConfig

func (c *StdOut) ReadConfig()

func (*StdOut) Run

func (o *StdOut) Run()

func (*StdOut) SetBuffer

func (o *StdOut) SetBuffer(b *bytes.Buffer)

func (*StdOut) SetLoggers added in v0.22.0

func (c *StdOut) SetLoggers(loggers []dnsutils.Worker)

func (*StdOut) Stop

func (o *StdOut) Stop()

type Syslog

type Syslog struct {
	// contains filtered or unexported fields
}

func NewSyslog

func NewSyslog(config *dnsutils.Config, console *logger.Logger, name string) *Syslog

func (*Syslog) Channel

func (o *Syslog) Channel() chan dnsutils.DnsMessage

func (*Syslog) GetName added in v0.22.0

func (c *Syslog) GetName() string

func (*Syslog) LogError

func (o *Syslog) LogError(msg string, v ...interface{})

func (*Syslog) LogInfo

func (o *Syslog) LogInfo(msg string, v ...interface{})

func (*Syslog) ReadConfig

func (c *Syslog) ReadConfig()

func (*Syslog) Run

func (o *Syslog) Run()

func (*Syslog) SetLoggers added in v0.22.0

func (c *Syslog) SetLoggers(loggers []dnsutils.Worker)

func (*Syslog) Stop

func (o *Syslog) Stop()

type TcpClient

type TcpClient struct {
	// contains filtered or unexported fields
}

func NewTcpClient

func NewTcpClient(config *dnsutils.Config, logger *logger.Logger, name string) *TcpClient

func (*TcpClient) Channel

func (o *TcpClient) Channel() chan dnsutils.DnsMessage

func (*TcpClient) GetName added in v0.22.0

func (c *TcpClient) GetName() string

func (*TcpClient) LogError

func (o *TcpClient) LogError(msg string, v ...interface{})

func (*TcpClient) LogInfo

func (o *TcpClient) LogInfo(msg string, v ...interface{})

func (*TcpClient) ReadConfig

func (o *TcpClient) ReadConfig()

func (*TcpClient) Run

func (o *TcpClient) Run()

func (*TcpClient) SetLoggers added in v0.22.0

func (c *TcpClient) SetLoggers(loggers []dnsutils.Worker)

func (*TcpClient) Stop

func (o *TcpClient) Stop()

type Webserver

type Webserver struct {
	// contains filtered or unexported fields
}

func NewWebserver

func NewWebserver(config *dnsutils.Config, logger *logger.Logger, version string, name string) *Webserver

func (*Webserver) BasicAuth

func (o *Webserver) BasicAuth(w http.ResponseWriter, r *http.Request) bool

func (*Webserver) Channel

func (o *Webserver) Channel() chan dnsutils.DnsMessage

func (*Webserver) GetName added in v0.22.0

func (c *Webserver) GetName() string

func (*Webserver) ListenAndServe

func (s *Webserver) ListenAndServe()

func (*Webserver) LogError

func (o *Webserver) LogError(msg string, v ...interface{})

func (*Webserver) LogInfo

func (o *Webserver) LogInfo(msg string, v ...interface{})

func (*Webserver) ReadConfig

func (o *Webserver) ReadConfig()

func (*Webserver) Run

func (s *Webserver) Run()

func (*Webserver) SetLoggers added in v0.22.0

func (c *Webserver) SetLoggers(loggers []dnsutils.Worker)

func (*Webserver) Stop

func (o *Webserver) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL