config

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Server configuration
	Server struct {
		Host            string        `mapstructure:"host"`
		Port            int           `mapstructure:"port"`
		ShutdownTimeout time.Duration `mapstructure:"shutdownTimeout"`
	} `mapstructure:"server"`

	// Kubernetes configuration
	Kubernetes KubernetesConfig `mapstructure:"kubernetes"`

	// Redis configuration
	Redis struct {
		Host     string `mapstructure:"host"`
		Port     int    `mapstructure:"port"`
		Password string `mapstructure:"password"`
		DB       int    `mapstructure:"db"`
		PoolSize int    `mapstructure:"poolSize"`
	} `mapstructure:"redis"`

	// Database configuration
	Database struct {
		Host     string `mapstructure:"host"`
		Port     int    `mapstructure:"port"`
		User     string `mapstructure:"user"`
		Password string `mapstructure:"password"`
		Database string `mapstructure:"database"`
		SSLMode  string `mapstructure:"sslMode"`
	} `mapstructure:"database"`

	// Auth configuration
	Auth struct {
		JWTSecret string `mapstructure:"jwtSecret"`
	} `mapstructure:"auth"`

	// Logging configuration
	Logging struct {
		Level       string `mapstructure:"level"`
		Format      string `mapstructure:"format"`
		Development bool   `mapstructure:"development"`
	} `mapstructure:"logging"`
}

Config is the main configuration structure

type KubernetesConfig

type KubernetesConfig struct {
	ConfigPath     string `mapstructure:"configPath"`
	InCluster      bool   `mapstructure:"inCluster"`
	Namespace      string `mapstructure:"namespace"`
	PodName        string `mapstructure:"podName"`
	LeaderElection struct {
		Enabled       bool          `mapstructure:"enabled"`
		LeaseDuration time.Duration `mapstructure:"leaseDuration"`
		RenewDeadline time.Duration `mapstructure:"renewDeadline"`
		RetryPeriod   time.Duration `mapstructure:"retryPeriod"`
	} `mapstructure:"leaderElection"`
}

KubernetesConfig defines configuration for Kubernetes client

Jump to

Keyboard shortcuts

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