common

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewZapToBadgerAdapter

func NewZapToBadgerAdapter(logger *zap.Logger) *zapToBadgerAdapter

func NewZapToGoKitAdapter

func NewZapToGoKitAdapter(logger *zap.Logger) *zapToGoKitAdapter

func RequestObjectName added in v0.0.26

func RequestObjectName(agentID, requstID string) string

func ResponseObjectName added in v0.0.26

func ResponseObjectName(agentID, requstID string) string

func ServeMetrics added in v0.0.9

func ServeMetrics(logger *zap.Logger)

Types

type CommonConfig

type CommonConfig struct {
	MQTTBroker string
	Username   string
	Password   string
	Logger     *zap.Logger
	CAFile     string
	Cert       string
	Key        string
	Protocol   string
}

type CommonConfigV2

type CommonConfigV2 struct {
	Profiling    Profiling    `mapstructure:"profiling"`
	Networking   Networking   `mapstructure:"networking"`
	StorageRelay StorageRelay `mapstructure:"storage_relay"`
	Split        Split        `mapstructure:"split"`
	Telemetry    Telemetry    `mapstructure:"telemetry"`
}

func CreateConfig

func CreateConfig(configPath string) (CommonConfigV2, error)

type Networking

type Networking struct {
	Format          string `mapstructure:"format" validate:"omitempty,oneof=json protobuf"`
	Compress        string `mapstructure:"compress" validate:"omitempty,oneof=none zstd"`
	LargeDataPolicy string `mapstructure:"large_data_policy" validate:"omitempty,oneof=none storage_relay split"`
}

type Profiling

type Profiling struct {
	Registry      string `mapstructure:"registry" validate:"omitempty,oneof=cloudprofiler pyroscope"`
	ServerAddress string `mapstructure:"server_address"`
}

type Split added in v0.0.2

type Split struct {
	ChunkBytes int `mapstructure:"chunk_bytes"`
}

type StorageRelay

type StorageRelay struct {
	ThresholdBytes int    `mapstructure:"threshold_bytes"`
	ObjstoreFile   string `mapstructure:"objstore_file"`
	Deletion       bool   `mapstructure:"deletion"`
}

type Telemetry added in v0.0.9

type Telemetry struct {
	Enabled bool `mapstructure:"enabled"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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