config

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, fallback string) string

func GetEnvAsBool

func GetEnvAsBool(name string, defaultVal bool) bool

func GetEnvAsInt

func GetEnvAsInt(name string, defaultVal int) int

func GetEnvAsUUID

func GetEnvAsUUID(name string) (uuid.UUID, error)

Types

type Config added in v0.0.14

type Config struct {
	ServicePort                 int
	NodeHost                    string
	XrayExecutablePath          string
	XrayAssetsPath              string
	SslCertFile                 string
	SslKeyFile                  string
	ApiKey                      uuid.UUID
	ServiceProtocol             string
	Debug                       bool
	GeneratedConfigPath         string
	LogBufferSize               int
	StartupLogTailSize          int
	StatsUpdateIntervalSeconds  int
	StatsCleanupIntervalSeconds int
}

func Load added in v0.0.14

func Load() (*Config, error)

func NewTestConfig added in v0.0.14

func NewTestConfig(generatedConfigPath string, key uuid.UUID) *Config

NewTestConfig creates a config for testing

Jump to

Keyboard shortcuts

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