config

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsE2ETestTransactionID added in v1.1.0

func IsE2ETestTransactionID(tid string, e2eTestUUIDs []string) bool

Types

type AppConfig

type AppConfig struct {
	Threshold           int               `json:"threshold"` //pub SLA in seconds, ex. 120
	QueueConf           QueueConfig       `json:"queueConfig"`
	MetricConf          []MetricConfig    `json:"metricConfig"`
	SplunkConf          SplunkConfig      `json:"splunk-config"`
	HealthConf          HealthConfig      `json:"healthConfig"`
	ValidationEndpoints map[string]string `json:"validationEndpoints"` //contentType to validation endpoint mapping
	Capabilities        []Capability      `json:"capabilities"`
	GraphiteAddress     string            `json:"graphiteAddress"`
	GraphiteUUID        string            `json:"graphiteUUID"`
	Environment         string            `json:"environment"`
}

AppConfig holds the application's configuration

func NewAppConfig

func NewAppConfig(configFileName string, log *logger.UPPLogger) (*AppConfig, error)

NewAppConfig opens the file at configFileName and unmarshals it into an AppConfig.

func (*AppConfig) GetCapability added in v1.1.0

func (cfg *AppConfig) GetCapability(metricAlias string) *Capability

type Capability added in v1.1.0

type Capability struct {
	Name        string   `json:"name"`
	MetricAlias string   `json:"metricAlias"`
	TestIDs     []string `json:"testIDs"`
}

Capability represents business capability configuration

type HealthConfig

type HealthConfig struct {
	FailureThreshold int `json:"failureThreshold"`
}

HealthConfig holds the application's healthchecks configuration

type MetricConfig added in v1.1.0

type MetricConfig struct {
	Granularity  int      `json:"granularity"` //how we split up the threshold, ex. 120/12
	Endpoint     string   `json:"endpoint"`
	ContentTypes []string `json:"contentTypes"` //list of valid types for this metric
	Alias        string   `json:"alias"`
	Health       string   `json:"health,omitempty"`
	APIKey       string   `json:"apiKey,omitempty"`
}

MetricConfig is the configuration of a PublishMetric

type QueueConfig added in v1.8.0

type QueueConfig struct {
	ClusterARN       string `json:"clusterARN"`
	ConnectionString string `json:"connectionString"`
	Topic            string `json:"topic"`
	ConsumerGroup    string `json:"consumerGroup"`
	LagTolerance     int    `json:"lagTolerance"`
}

QueueConfig is the configuration for kafka consumer queue

type SplunkConfig

type SplunkConfig struct {
	LogPrefix string `json:"logPrefix"`
}

SplunkConfig holds the SplunkFeeder-specific configuration

Jump to

Keyboard shortcuts

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