config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config loads server configuration from environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ConfigPath is the path to the YAML configuration file.
	ConfigPath string `env:"YAML_MCP_CONFIG" envDefault:"config.yaml"`
	// LogLevel sets the logger level.
	LogLevel string `env:"YAML_MCP_LOG_LEVEL" envDefault:"info"`
	// Lang selects message language for templates.
	Lang string `env:"YAML_MCP_LANG" envDefault:"en"`
	// ShutdownTimeout controls graceful shutdown duration.
	ShutdownTimeout time.Duration `env:"YAML_MCP_SHUTDOWN_TIMEOUT" envDefault:"10s"`
}

Config stores environment-driven settings for the server.

func Load

func Load() (Config, error)

Load parses environment variables into Config.

Jump to

Keyboard shortcuts

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