config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config provide struct that are representatio of service configuration. Also it provide function MustLoad which load variable from ENV

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// PeerName               string `env:"PEER_NAME"`
	// PeerPort               int    `env:"PEER_PORT" env-default:"8001"`
	LogLevel               slog.Level `env:"LOG_LEVEL" env-default:"INFO"`
	WebSocketPort          int        `env:"WEBSOCKET_PORT" env-default:"8001"`
	MulticastAddress       string     `env:"MULTICAST_ADDRESS" env-default:"235.5.5.11"`
	MulticastPort          int        `env:"MULTICAST_PORT" env-default:"8001"`
	MulticastInterfaceName string     `env:"MULTICAST_INTERFACE_NAME" env-default:"wlan0"`
	CachePath              string     `env:"CACHE_PATH"`
	LogFile                string
	IDFile                 string
}

func MustLoad

func MustLoad() *Config

Jump to

Keyboard shortcuts

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