utils

package
v0.0.0-...-23465b2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAgentVersionToDomain

func AddAgentVersionToDomain(DDURL string, app string) (string, error)

AddAgentVersionToDomain prefixes the domain with the agent version: X-Y-Z.domain

func GetInfraEndpoint

func GetInfraEndpoint(c conf.ConfigReader) string

GetInfraEndpoint returns the main DD Infra URL defined in config, based on the value of `site` and `dd_url`

func GetMainEndpoint

func GetMainEndpoint(c conf.ConfigReader, prefix string, ddURLKey string) string

GetMainEndpoint returns the main DD URL defined in the config, based on `site` and the prefix, or ddURLKey

func GetMainEndpointBackwardCompatible

func GetMainEndpointBackwardCompatible(c conf.ConfigReader, prefix string, ddURLKey string, backwardKey string) string

GetMainEndpointBackwardCompatible implements the logic to extract the DD URL from a config, based on `site`,ddURLKey and a backward compatible key

func GetMultipleEndpoints

func GetMultipleEndpoints(c conf.ConfigReader) (map[string][]string, error)

GetMultipleEndpoints returns the api keys per domain specified in the main agent config

func SanitizeAPIKey

func SanitizeAPIKey(key string) string

SanitizeAPIKey strips newlines and other control characters from a given string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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