Documentation
¶
Overview ¶
Package resolver contains logic to perform per `transaction.Endpoint` domain resolution. The idea behind this package is to allow the forwarder to send some data to a given domain and other kinds of data to other domains based on the targeted `transaction.Endpoint`.
Index ¶
- func NewSingleDomainResolvers(keysPerDomain map[string][]utils.APIKeys) (map[string]DomainResolver, error)
- func OnUpdateConfig(resolver DomainResolver, log log.Component, config config.Component)
- type DestinationType
- type DomainResolver
- func NewDomainResolverWithMetricToVector(mainEndpoint string, apiKeys []utils.APIKeys, vectorEndpoint string) (DomainResolver, error)
- func NewLocalDomainResolver(domain string, authToken string) DomainResolver
- func NewMultiDomainResolver(domain string, apiKeys []utils.APIKeys) (DomainResolver, error)
- func NewSingleDomainResolver(domain string, apiKeys []utils.APIKeys) (DomainResolver, error)
- type ForwarderHealth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSingleDomainResolvers ¶
func NewSingleDomainResolvers(keysPerDomain map[string][]utils.APIKeys) (map[string]DomainResolver, error)
NewSingleDomainResolvers converts a map of domain/api keys into a map of SingleDomainResolver
func OnUpdateConfig ¶ added in v0.66.0
func OnUpdateConfig(resolver DomainResolver, log log.Component, config config.Component)
OnUpdateConfig adds a hook into the config which will listen for updates to the API keys of the resolver.
Types ¶
type DestinationType ¶
type DestinationType int
DestinationType is used to identified the expected endpoint
const ( // Datadog enpoints Datadog DestinationType = iota // Vector endpoints Vector // Local endpoints Local )
type DomainResolver ¶
type DomainResolver = *domainResolver
DomainResolver is a syntactic backwards compatibility shim
func NewDomainResolverWithMetricToVector ¶
func NewDomainResolverWithMetricToVector(mainEndpoint string, apiKeys []utils.APIKeys, vectorEndpoint string) (DomainResolver, error)
NewDomainResolverWithMetricToVector initialize a resolver with metrics diverted to a vector endpoint
func NewLocalDomainResolver ¶ added in v0.60.0
func NewLocalDomainResolver(domain string, authToken string) DomainResolver
NewLocalDomainResolver creates a LocalDomainResolver with domain in local cluster and authToken for internal communication For example, the internal cluster-agent endpoint
func NewMultiDomainResolver ¶
func NewMultiDomainResolver(domain string, apiKeys []utils.APIKeys) (DomainResolver, error)
NewMultiDomainResolver initializes a MultiDomainResolver with its API keys and base destination
func NewSingleDomainResolver ¶
func NewSingleDomainResolver(domain string, apiKeys []utils.APIKeys) (DomainResolver, error)
NewSingleDomainResolver creates a SingleDomainResolver with its destination domain & API keys
type ForwarderHealth ¶ added in v0.67.0
ForwarderHealth interface is implemented by the health checker. The resolver uses this method to inform the healthchecker when API keys have been updated.