config

package
v0.52.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectLegacyINIFormat

func DetectLegacyINIFormat(content []byte) bool

func DetectLegacyINIFormatFromFile

func DetectLegacyINIFormatFromFile(path string) bool

func LoadAdditionalClientConfigs

func LoadAdditionalClientConfigs(paths []string, isLegacyFormat bool) ([]v1.ProxyConfigurer, []v1.VisitorConfigurer, error)

func LoadClientConfigFromBuffer

func LoadClientConfigFromBuffer(b []byte) (
	*v1.ClientCommonConfig,
	[]v1.ProxyConfigurer,
	[]v1.VisitorConfigurer,
	bool, error,
)

func LoadConfigure

func LoadConfigure(b []byte, c any) error

LoadConfigure loads configuration from bytes and unmarshal into c. Now it supports json, yaml and toml format.

func LoadConfigureFromFile

func LoadConfigureFromFile(path string, c any) error

func LoadFileContentWithTemplate

func LoadFileContentWithTemplate(path string, values *Values) ([]byte, error)

func LoadServerConfig

func LoadServerConfig(path string) (*v1.ServerConfig, bool, error)

func NewProxyConfigurerFromMsg

func NewProxyConfigurerFromMsg(m *msg.NewProxy, serverCfg *v1.ServerConfig) (v1.ProxyConfigurer, error)

func RenderWithTemplate

func RenderWithTemplate(in []byte, values *Values) ([]byte, error)

Types

type Values

type Values struct {
	Envs map[string]string // environment vars
}

func GetValues

func GetValues() *Values

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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