querylog

package
v3.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvroSchema added in v3.3.0

func AvroSchema() (avro.Schema, error)

Types

type AvroLogger added in v3.3.0

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

func NewAvroLogger added in v3.3.0

func NewAvroLogger(path string, maxsize int, maxtime time.Duration) (*AvroLogger, error)

func (*AvroLogger) Close added in v3.3.0

func (l *AvroLogger) Close() error

func (*AvroLogger) Write added in v3.3.0

func (l *AvroLogger) Write(e *Entry) error

type Entry

type Entry struct {
	Time        int64
	Hostname    string `json:",omitempty"` // not filled in by geodns
	Origin      string
	Name        string
	Qtype       uint16
	Rcode       int
	AnswerCount int `json:"Answers"`
	Targets     []string
	AnswerData  []string
	LabelName   string
	RemoteAddr  string
	ClientAddr  string
	HasECS      bool
	IsTCP       bool
	Version     string
}

type FileLogger

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

func NewFileLogger

func NewFileLogger(filename string, maxsize int, keep int) (*FileLogger, error)

func (*FileLogger) Close

func (l *FileLogger) Close() error

func (*FileLogger) Write

func (l *FileLogger) Write(e *Entry) error

type QueryLogger

type QueryLogger interface {
	Write(*Entry) error
	Close() error
}

Jump to

Keyboard shortcuts

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