package
2.12.0+incompatible
Repository: https://github.com/adguardteam/adguarddns.git
Documentation: pkg.go.dev

# Functions

BoolString returns "1" if cond is true and "0" otherwise.
ExperimentGauge returns the gauge used to inform about running experiments.
IncrementCond increments trueCounter if cond is true and falseCounter otherwise.
Namespace returns the namespace that we use in our prometheus metrics.
NewAllowlist registers the Consul allowlist metrics in reg and returns a properly initialized [Allowlist].
NewBackendGRPC registers the protobuf errors metrics in reg and returns a properly initialized [BackendGRPC].
NewBackendProfileDB registers the protobuf errors metrics in reg and returns a properly initialized [BackendProfileDB].
NewBackendRemoteKV registers the backend remote key-value storage metrics in reg and returns a properly initialized [BackendRemoteKV].
NewBillstat registers the billing-statistics metrics in reg and returns a properly initialized [Billstat].
NewConnLimiter registers the stream-connections metrics in reg and returns a properly initialized [*ConnLimiter].
NewDefaultMainMiddleware registers the filtering-middleware metrics in reg and returns a properly initialized *DefaultMainMiddleware.
NewDefaultRatelimitMiddleware registers the middleware metrics of the access and ratelimiting middleware in reg and returns a properly initialized *DefaultRatelimitMiddleware.
NewDNSCheck registers the DNS checker metrics in reg and returns a properly initialized [*DNSCheck].
NewDNSDB registers the filtering rule metrics in reg and returns a properly initialized [*DNSDB].
NewECSCache registers the ECS cache metrics in reg and returns a properly initialized [*ECSCache].
NewFilter registers the filtering metrics in reg and returns a properly initialized *Filter.
NewGeoIP registers the GeoIP metrics in reg and returns a properly initialized GeoIP.
NewHashPrefixFilter registers the filtering metrics in reg and returns a properly initialized *HashPrefixFilter.
NewProfileDB registers the user profiles metrics in reg and returns a properly initialized [ProfileDB].
NewQueryLog creates a new Prometheus-based query log metrics collector.
NewRedisKV registers the Redis KV metrics in reg and returns a properly initialized [RedisKV].
NewRuleStat registers the filtering rule metrics in reg and returns a properly initialized [*RuleStat].
NewTLSConfig registers the TLS-related metrics in reg and returns a properly initialized [TLSConfig].
NewUserCounter initializes and returns a properly initialized *UserCounter that uses the given gauges to estimate the user count.
SetAdditionalInfo adds a gauge with extra info labels.
SetStatusGauge is a helper function that automatically checks if there's an error and sets the gauge to either 1 (success) or 0 (error).
SetUpGauge signals that the server has been started.

# Constants

gRPC errors of [GRPCError] type.
gRPC errors of [GRPCError] type.
gRPC errors of [GRPCError] type.
gRPC errors of [GRPCError] type.
gRPC errors of [GRPCError] type.
gRPC errors of [GRPCError] type.
Remote key-value storage operation names for [RemoteKVOp].
Remote key-value storage operation names for [RemoteKVOp].

# Variables

AccessProfileInitDuration is a histogram with the duration of a profile access internal engine initialization.
BindToDeviceTCPConnsChanSize is a gauge with the current number of TCP connections in the buffer of the channel by each subnet.
BindToDeviceUDPSessionsChanSize is a gauge with the current number of UDP sessions in the buffer of the channel by each subnet.
BindToDeviceUDPWriteDurationSeconds is a histogram of durations of UDP write operations.
BindToDeviceUDPWriteRequestsChanSize is a gauge with the current number of UDP write requests in the buffer of the channel for each interface listener.
BindToDeviceUnknownTCPRequestsTotal is the total counter of DNS requests over TCP to unknown local addresses.
BindToDeviceUnknownUDPRequestsTotal is the total counter of DNS requests over UDP to unknown local addresses.
DNSSvcApplePrivateRelayRequestsTotal is a counter with total number of requests for the domain name that Apple devices use to check if Apple Private Relay can be enabled.
DNSSvcBadResolverARPA is a counter with total number of requests for malformed resolver.arpa queries.
DNSSvcChromePrefetchRequestsTotal is a counter with total number of requests for the domain name that Chrome uses to check if it should use its prefetch proxy.
DNSSvcDDRRequestsTotal is a counter with total number of requests for Discovery of Designated Resolvers.
DNSSvcDoHAuthFailsTotal is the counter of DoH basic authentication failures.
DNSSvcFirefoxRequestsTotal is a counter with total number of requests for the domain name that Firefox uses to check if it should use its own DNS-over-HTTPS settings.
WebSvcAdultBlockingPageRequestsTotal is a counter with total number of requests for adult blocking page.
WebSvcDNSCheckTestRequestsTotal is a counter with total number of requests for dnscheck_test.
WebSvcError404RequestsTotal is a counter with total number of requests with error 404.
WebSvcError500RequestsTotal is a counter with total number of requests with error 500.
WebSvcGeneralBlockingPageRequestsTotal is a counter with total number of requests for general blocking page.
WebSvcLinkedIPProxyRequestsTotal is a counter with total number of requests with linked ip.
WebSvcRobotsTxtRequestsTotal is a counter with total number of requests for robots_txt.
WebSvcRootRedirectRequestsTotal is a counter with total number of root redirected requests.
WebSvcSafeBrowsingPageRequestsTotal is a counter with total number of requests for safe browsing page.
WebSvcStaticContentRequestsTotal is a counter with total number of requests for static content.

# Structs

Allowlist is the Prometheus-based implementation of the [consul.Metrics] interface.
BackendGRPC is the Prometheus-based implementation of the [backendpb.GRPCMetrics] interface.
BackendProfileDB is the Prometheus-based implementation of the [backendpb.ProfileDBMetrics] interface.
BackendRemoteKV is the Prometheus-based implementation of the [backendpb.Metrics] interface.
Billstat is the Prometheus-based implementation of the [billstat.Metrics] interface.
ClonerStat is the Prometheus-based implementation of the [dnsmsg.ClonerStat] interface.
ConnLimiter is a Prometheus-based implementation of the [connlimiter.Metrics] interface.
ConnLimiterConnMetricsData is an alias for a structure that contains information about a stream-connection.
DefaultMainMiddleware is the Prometheus-based implementation of the [MainMiddleware] interface.
DefaultRatelimitMiddleware is the Prometheus-based implementation of the [RatelimitMiddleware] interface.
DNSCheck is the Prometheus-based implementation of the [dnscheck.Metrics] interface.
DNSDB is the Prometheus-based implementation of the [dnsdb.Metrics] interface.
ECSCache is a Prometheus-based implementation of the [ecscache.Metrics] interface.
Filter is the Prometheus-based implementation of the [Filter] interface.
GeoIP is the Prometheus-based implementation of the [geoip.Metrics] interface.
HashPrefixFilter is the Prometheus-based implementation of the [hashprefix.Metrics] interface.
MainMiddlewareRequestMetrics is an alias for a structure that contains the information about a request that has reached the filtering middleware.
ProfileDB is the Prometheus-based implementation of the [profiledb.Metrics] interface.
QueryLog is the Prometheus-based implementation of the [querylog.Metrics] interface.
RedisKV is the Prometheus-based implementation of the [rediskv.Metrics] interface.
RuleStat is the Prometheus-based implementation of the [rulestat.Metrics] interface.
TLSConfig is the Prometheus-based implementation of the [tlsconfig.Metrics] interface.
UpdateMetrics is an alias for a structure that contains the information about a user profiles update operation.
UserCounter is used to save estimated counts of active users per hour and per day by some data.

# Interfaces

MainMiddleware is an interface for collection of the statistics of the main filtering middleware.
RatelimitMiddleware is an interface for collection of the statistics of the access and ratelimit middleware.

# Type aliases

GRPCError is a type alias for string that contains gGRPC error type.
RemoteKVOp is the type alias for string that contains remote key-value storage operation name.