config

package
v0.0.0-...-c160ba3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFlushInterval = time.Second
View Source
const DefaultListenPort = 8090
View Source
const DefaultSessionWindow = 3 * time.Minute

Variables

This section is empty.

Functions

func Flags

func Flags() []cli.Flag

func Set

func Set(ctx context.Context, c Config) context.Context

Types

type Config

type Config struct {
	SessionWindow time.Duration
	TimeSeries    TimeSeries
	Store         badger.Options
	Remote        Remote
	ListenPort    int
}

func Default

func Default() Config

func Get

func Get(ctx context.Context) Config

func (Config) With

func (c Config) With(ctx *cli.Context) Config

type QueryConfig

type QueryConfig struct {
	Limits QueryLimits
}

type QueryLimits

type QueryLimits struct {
	Sample       int
	Concurrency  int
	BytesInFrame int
}

type Remote

type Remote struct {
	Read  RemoteConfig
	Write RemoteConfig
	Query QueryConfig
}

type RemoteConfig

type RemoteConfig struct {
	URL              string
	Timeout          time.Duration
	Headers          map[string]string
	RetryOnRateLimit bool
}

func (*RemoteConfig) Config

func (r *RemoteConfig) Config() (*remote.ClientConfig, error)

type TimeSeries

type TimeSeries struct {
	FlushInterval time.Duration
}

Jump to

Keyboard shortcuts

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