conf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (

)

Variables

This section is empty.

Functions

func LoadConfigFromToml

func LoadConfigFromToml(path string) error

LoadConfigFromToml load from configuration file

Types

type App

type App struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	GrpcHost string `toml:"grpc_host"`
	GrpcPort int    `toml:"grpc_port"`
}

func (*App) Addr

func (a *App) Addr() string

func (*App) GrpcAddr

func (a *App) GrpcAddr() string

type Config

type Config struct {
	*Log        `toml:"log"`
	*App        `toml:"app"`
	*Kube       `toml:"kube"`
	*Supervisor `toml:"supervisor"`
}

func GetConf

func GetConf() *Config

type Kube

type Kube struct {
	KubeConfig string `toml:"kubeConfigPath"`
	// contains filtered or unexported fields
}

func (*Kube) GetClientSet

func (k *Kube) GetClientSet() (kubernetes.Interface, error)

func (*Kube) GetComposeClient

func (k *Kube) GetComposeClient() (client.Client, error)

func (*Kube) GetUnitClient

func (k *Kube) GetUnitClient() (client.Client, error)

type Log

type Log struct {
	Level   string `toml:"level"`
	PathDir string `toml:"dir"`
}

func (*Log) GetLogLevel

func (l *Log) GetLogLevel() zapcore.Level

type Supervisor

type Supervisor struct {
	Addr string `toml:"address"`
	Port int    `toml:"port"`
	// contains filtered or unexported fields
}

func (*Supervisor) GetSupervisorClient

func (s *Supervisor) GetSupervisorClient() (*supervisord.Client, error)

Jump to

Keyboard shortcuts

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