conf

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(env string, level zapcore.Level) *zap.SugaredLogger

func InitNewMemoryReporter

func InitNewMemoryReporter(statsd statsd.ClientInterface, logger *zap.SugaredLogger)

func NewLogger

func NewLogger(env *Config) *zap.SugaredLogger

func NewMetricsClient

func NewMetricsClient(env *Config, logger *zap.SugaredLogger) (statsd.ClientInterface, error)

Types

type AuthConfig

type AuthConfig struct {
	WellKnown  string
	Audience   []string
	Issuer     []string
	Middleware string
}

type Config

type Config struct {
	Logger                  *zap.SugaredLogger
	Env                     string
	Port                    string
	StoreLocation           string
	BackupLocation          string
	BackupSchedule          string
	BackupRsync             bool
	AgentHost               string
	SecretsManager          string
	Auth                    *AuthConfig
	DlJwtConfig             *DatalayerJwtConfig
	GcOnStartup             bool
	FullsyncLeaseTimeout    time.Duration
	BlockCacheSize          int64
	ValueLogFileSize        int64
	MaxCompactionLevels     int
	AdminUserName           string
	AdminPassword           string
	NodeID                  string
	SecurityStorageLocation string
	BackupSourceLocation    string
	RunnerConfig            *RunnerConfig
	SlowLogThreshold        time.Duration
}

func LoadConfig

func LoadConfig(configFile string) (*Config, error)

LoadConfig bootstraps the environment from the .env files, but also takes care of getting secrets from the secrets store. It will first start a logger to be able to log that it is loading an environment, and as soon as it knows more about that, it will switch to the correct logger You can give it a basePath, this is great for testing, but by default this is set to "."

func NewConfig

func NewConfig() (*Config, error)

Creates a config without loading the environment and sets all defaults

type DatalayerJwtConfig

type DatalayerJwtConfig struct {
	ClientID     string
	ClientSecret string
	Audience     string
	GrantType    string
	Endpoint     string
}

type RunnerConfig

type RunnerConfig struct {
	PoolIncremental int
	PoolFull        int
	Concurrent      int
}

RunnerConfig sets the initial config for the underlying job runner. PoolIncremental defines the max number of jobs that can be ran at once Concurrent defines how many of the same EntryID should be allowed, this should always be 0 in the datahub

Jump to

Keyboard shortcuts

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