bind

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// QryRTT is the common prefix of query round-trip histogram counters.
	QryRTT = "QryRTT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Stats(...StatisticGroup) (Statistics, error)
}

Client queries the BIND API, parses the response and returns stats in a generic format.

type Counter

type Counter struct {
	Name    string `xml:"name,attr"`
	Counter uint64 `xml:",chardata"`
}

Counter represents a single counter value.

type Gauge

type Gauge struct {
	Name  string `xml:"name"`
	Gauge uint64 `xml:"counter"`
}

Gauge represents a single gauge value.

type Server

type Server struct {
	BootTime         time.Time
	ConfigTime       time.Time
	IncomingQueries  []Counter
	IncomingRequests []Counter
	NameServerStats  []Counter
	ZoneStatistics   []Counter
	ServerRcodes     []Counter
}

Server represents BIND server statistics.

type StatisticGroup

type StatisticGroup string

StatisticGroup describes a sub-group of BIND statistics.

const (
	ServerStats StatisticGroup = "server"
	ViewStats   StatisticGroup = "view"
	TaskStats   StatisticGroup = "tasks"
)

Available statistic groups.

type Statistics

type Statistics struct {
	Server      Server
	Views       []View
	ZoneViews   []ZoneView
	TaskManager TaskManager
}

Statistics is a generic representation of BIND statistics.

type Task

type Task struct {
	ID         string `xml:"id"`
	Name       string `xml:"name"`
	Quantum    int64  `xml:"quantum"`
	References uint64 `xml:"references"`
	State      string `xml:"state"`
}

Task represents a single running task.

type TaskManager

type TaskManager struct {
	Tasks       []Task      `xml:"tasks>task"`
	ThreadModel ThreadModel `xml:"thread-model"`
}

TaskManager contains information about all running tasks.

type ThreadModel

type ThreadModel struct {
	Type           string `xml:"type"`
	WorkerThreads  uint64 `xml:"worker-threads"`
	DefaultQuantum uint64 `xml:"default-quantum"`
	TasksRunning   uint64 `xml:"tasks-running"`
}

ThreadModel contains task and worker information.

type View

type View struct {
	Name            string
	Cache           []Gauge
	ResolverStats   []Counter
	ResolverQueries []Counter
}

View represents statistics for a single BIND view.

type ZoneCounter added in v0.4.0

type ZoneCounter struct {
	Name   string
	Serial string
}

Counter represents a single zone counter value.

type ZoneView added in v0.4.0

type ZoneView struct {
	Name     string
	ZoneData []ZoneCounter
}

View represents statistics for a single BIND zone view.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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