config

package
v0.6.4-1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDevelopment

func IsDevelopment() bool

func Revision

func Revision() string

func Version

func Version() string

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(log *Logger, vpr *viper.Viper) *Config

func (*Config) APIBacklog

func (cfg *Config) APIBacklog() int

func (*Config) APIBasicAuthPassword

func (cfg *Config) APIBasicAuthPassword() string

func (*Config) APIBasicAuthUsername

func (cfg *Config) APIBasicAuthUsername() string

func (*Config) APIConcurrency

func (cfg *Config) APIConcurrency() int

func (*Config) APIEnabled

func (cfg *Config) APIEnabled() bool

func (*Config) APIIdleTimeout

func (cfg *Config) APIIdleTimeout() time.Duration

func (*Config) APIListenIP

func (cfg *Config) APIListenIP() string

func (*Config) APIListenPort

func (cfg *Config) APIListenPort() int

func (*Config) APIMaxRequestBodySize

func (cfg *Config) APIMaxRequestBodySize() int

func (*Config) APIReadBufferSize

func (cfg *Config) APIReadBufferSize() int

func (*Config) APIReadTimeout

func (cfg *Config) APIReadTimeout() time.Duration

func (*Config) APITCPKeepalive

func (cfg *Config) APITCPKeepalive() bool

func (*Config) APITCPKeepalivePeriod

func (cfg *Config) APITCPKeepalivePeriod() time.Duration

func (*Config) APITLSCertfile

func (cfg *Config) APITLSCertfile() string

func (*Config) APITLSKeyfile

func (cfg *Config) APITLSKeyfile() string

func (*Config) APIWorkers

func (cfg *Config) APIWorkers() int

func (*Config) APIWriteBufferSize

func (cfg *Config) APIWriteBufferSize() int

func (*Config) APIWriteTimeout

func (cfg *Config) APIWriteTimeout() time.Duration

func (*Config) ConfigFileUsed

func (cfg *Config) ConfigFileUsed() string

func (*Config) DBFile

func (cfg *Config) DBFile() string

func (*Config) DBMaxTempDirectorySize

func (cfg *Config) DBMaxTempDirectorySize() int

func (*Config) DBMemoryLimit

func (cfg *Config) DBMemoryLimit() int

func (*Config) DBTempDirectory

func (cfg *Config) DBTempDirectory() string

func (*Config) DBThreads

func (cfg *Config) DBThreads() int

func (*Config) Log

func (cfg *Config) Log() *Logger

func (*Config) LogCaller

func (cfg *Config) LogCaller() bool

func (*Config) LogJSON

func (cfg *Config) LogJSON() bool

func (*Config) Logfile

func (cfg *Config) Logfile() string

func (*Config) Loglevel

func (cfg *Config) Loglevel() zerolog.Level

func (*Config) Metrics

func (cfg *Config) Metrics() *Metrics

func (*Config) ScraperCommand

func (cfg *Config) ScraperCommand() []string

func (*Config) ScraperEnabled

func (cfg *Config) ScraperEnabled() bool

func (*Config) ScraperPeriod

func (cfg *Config) ScraperPeriod() time.Duration

func (*Config) ScraperTimeout

func (cfg *Config) ScraperTimeout() time.Duration

func (*Config) SetLog

func (cfg *Config) SetLog(log *Logger)

type Logger

type Logger struct {
	*zerolog.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(log *zerolog.Logger) *Logger

func NewTestLogger

func NewTestLogger(tl zerolog.TestingLog, level zerolog.Level) *Logger

func (*Logger) Buffer

func (log *Logger) Buffer() *LoggingBuffer

func (*Logger) Fatal

func (log *Logger) Fatal() *zerolog.Event

type LoggingBuffer

type LoggingBuffer struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

func (*LoggingBuffer) Clear

func (b *LoggingBuffer) Clear()

func (*LoggingBuffer) Events

func (b *LoggingBuffer) Events() []map[string]any

func (*LoggingBuffer) Write

func (b *LoggingBuffer) Write(p []byte) (int, error)

type Metrics

type Metrics struct {
	Registry *prometheus.Registry
}

func NewMetrics

func NewMetrics() *Metrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳