Documentation ¶
Index ¶
Constants ¶
View Source
const ( // metrics prefix MetricsPrefix = "gudgeon-" // metrics names are prefixed by the metrics prefix and delim TotalRules = "active-rules" TotalQueries = "total-session-queries" TotalLifetimeQueries = "total-lifetime-queries" TotalIntervalQueries = "total-interval-queries" CachedQueries = "cached-queries" BlockedQueries = "blocked-session-queries" BlockedLifetimeQueries = "blocked-lifetime-queries" BlockedIntervalQueries = "blocked-interval-queries" QueryTime = "query-time" // cache entries CurrentCacheEntries = "cache-entries" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheSizeFunction ¶ added in v0.4.0
type CacheSizeFunction = func() int64
type Metrics ¶
type Metrics interface { GetAll() map[string]*Metric Get(name string) *Metric // use cache function UseCacheSizeFunction(function CacheSizeFunction) // record relevant metrics based on request RecordQueryMetrics(request *dns.Msg, response *dns.Msg, rCon *resolver.RequestContext, result *resolver.ResolutionResult) // Query metrics from db Query(start time.Time, end time.Time) ([]*MetricsEntry, error) // stop Stop() }
func New ¶
func New(config *config.GudgeonConfig) Metrics
Click to show internal directories.
Click to hide internal directories.