config

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferSizes added in v1.8.0

type BufferSizes struct {
	Websocket        int `yaml:"websocket"`
	CTLog            int `yaml:"ctlog"`
	BroadcastManager int `yaml:"broadcastmanager"`
}

type Config

type Config struct {
	Webserver struct {
		ServerConfig       `yaml:",inline"`
		FullURL            string `yaml:"full_url"`
		LiteURL            string `yaml:"lite_url"`
		DomainsOnlyURL     string `yaml:"domains_only_url"`
		CompressionEnabled bool   `yaml:"compression_enabled"`
	}
	Prometheus struct {
		ServerConfig        `yaml:",inline"`
		Enabled             bool   `yaml:"enabled"`
		MetricsURL          string `yaml:"metrics_url"`
		ExposeSystemMetrics bool   `yaml:"expose_system_metrics"`
	}
	General struct {
		AdditionalLogs []LogConfig `yaml:"additional_logs"`
		BufferSizes    BufferSizes `yaml:"buffer_sizes"`
		DropOldLogs    *bool       `yaml:"drop_old_logs"`
	}
}
var (
	AppConfig Config
	Version   = "1.8.1"
)

func ReadConfig

func ReadConfig(configPath string) (Config, error)

ReadConfig reads the config file and returns a filled Config struct.

type LogConfig added in v1.8.0

type LogConfig struct {
	Operator    string `yaml:"operator"`
	URL         string `yaml:"url"`
	Description string `yaml:"description"`
}

type ServerConfig added in v1.4.0

type ServerConfig struct {
	ListenAddr  string   `yaml:"listen_addr"`
	ListenPort  int      `yaml:"listen_port"`
	CertPath    string   `yaml:"cert_path"`
	CertKeyPath string   `yaml:"cert_key_path"`
	RealIP      bool     `yaml:"real_ip"`
	Whitelist   []string `yaml:"whitelist"`
}

Jump to

Keyboard shortcuts

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