resolver

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

type ForwarderHealth interface {
	UpdateAPIKeys(domain string, old []string, new []string)
}

ForwarderHealth interface is implemented by the health checker. The resolver uses this method to inform the healthchecker when API keys have been updated.

Jump to

Keyboard shortcuts

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