config

package
v1.300042.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultThreshold        = 500
	DefaultRotationInterval = 1 * time.Hour
	DefaultGCInterval       = 10 * time.Minute
)
View Source
const (
	// PlatformGeneric Platforms other than Amazon EKS
	PlatformGeneric = "generic"
	// PlatformEKS Amazon EKS platform
	PlatformEKS = "eks"
	// PlatformK8s Native Kubernetes
	PlatformK8s = "k8s"
	// PlatformEC2 Amazon EC2 platform
	PlatformEC2 = "ec2"
	// PlatformECS Amazon ECS
	PlatformECS = "ecs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Resolvers []Resolver     `mapstructure:"resolvers"`
	Rules     []rules.Rule   `mapstructure:"rules"`
	Limiter   *LimiterConfig `mapstructure:"limiter"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

type LimiterConfig

type LimiterConfig struct {
	Threshold                 int             `mapstructure:"drop_threshold"`
	Disabled                  bool            `mapstructure:"disabled"`
	LogDroppedMetrics         bool            `mapstructure:"log_dropped_metrics"`
	RotationInterval          time.Duration   `mapstructure:"rotation_interval"`
	GarbageCollectionInterval time.Duration   `mapstructure:"garbage_collection_interval"`
	ParentContext             context.Context `mapstructure:"-"`
}

func NewDefaultLimiterConfig

func NewDefaultLimiterConfig() *LimiterConfig

func (*LimiterConfig) Validate

func (lc *LimiterConfig) Validate()

type Resolver

type Resolver struct {
	Name     string `mapstructure:"name"`
	Platform string `mapstructure:"platform"`
}

func NewEC2Resolver

func NewEC2Resolver(name string) Resolver

func NewEKSResolver

func NewEKSResolver(name string) Resolver

func NewGenericResolver

func NewGenericResolver(name string) Resolver

func NewK8sResolver

func NewK8sResolver(name string) Resolver

Jump to

Keyboard shortcuts

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