config

package
v0.0.0-...-39cf8b4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFilename = "config.toml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Remote  []Remote
	Apps    []silly_ctrl.App
	Ctrl    silly_ctrl.Config
	Log     LogConf
	TLS     TLSConfig
	Forward []Forward
	// contains filtered or unexported fields
}

func Default

func Default() *Config

func LoadConfig

func LoadConfig(filename string) (*Config, error)

func (*Config) Logger

func (c *Config) Logger() *slog.Logger

func (*Config) TLSConfig

func (c *Config) TLSConfig() *tls.Config

type Forward

type Forward struct {
	Via           string
	App           string
	LocalAddress  string
	RemoteAddress string
}

type LogConf

type LogConf struct {
	Filename  string
	Level     slog.Level
	MaxSize   int
	MaxAge    int
	MaxBackup int
}

type Remote

type Remote struct {
	App     silly_ctrl.App
	Address string
}

type TLSConfig

type TLSConfig struct {
	PrivateKey string
	Cert       string
	SkipVerify bool
}

Jump to

Keyboard shortcuts

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