envsettings

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvPrometheusLabelID     = "PROMETHEUS_LABEL_ID"
	EnvPrometheusNamespace   = "PROMETHEUS_NAMESPACE"
	EnvPrometheusPushGateway = "PROMETHEUS_PUSH_GATEWAY"

	EnvLogFilePath = "LOG_FILE_PATH"
	EnvLogFormat   = "F1_LOG_FORMAT"
	EnvLogLevel    = "F1_LOG_LEVEL"

	EnvFluentdHost = "FLUENTD_HOST"
	EnvFluentdPort = "FLUENTD_PORT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fluentd

type Fluentd struct {
	Host string
	Port string
}

func (Fluentd) Present

func (f Fluentd) Present() bool

type Log

type Log struct {
	FilePath string
	Level    string
	Format   string
}

func (Log) IsFormatJSON

func (l Log) IsFormatJSON() bool

func (Log) SlogLevel

func (l Log) SlogLevel() slog.Level

type Prometheus

type Prometheus struct {
	LabelID     string
	Namespace   string
	PushGateway string
}

type Settings

type Settings struct {
	Prometheus Prometheus
	Fluentd    Fluentd
	Log        Log
}

func Get

func Get() Settings

func (*Settings) PrometheusEnabled

func (s *Settings) PrometheusEnabled() bool

Jump to

Keyboard shortcuts

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