config

package
v0.0.0-...-5a11d6c Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCfg = &Config{}

Functions

func Load

func Load() error

Load 只会在启动时被调用

func LoadDefaultConfig

func LoadDefaultConfig(path string) error

Types

type Config

type Config struct {
	Kubernetes `ini:"kubernetes"`
	XDS        `ini:"xds"`
	Envoy      `ini:"envoy"`
}

func GetConfig

func GetConfig() Config

GetConfig 获取配置使用这个方法

type Envoy

type Envoy struct {
	NodeId string `ini:"node_id"`
}

type Kubernetes

type Kubernetes struct {
	Namespace  string `ini:"namespace"`
	KubeConfig string `ini:"kube_config"`
	Token      string `ini:"token"`
	MasterUrl  string `ini:"master_url"`
}

Kubernetes 与 kubernetes 相关的配置, 如果写了 KubeConfig 就不用再填其它的了

type XDS

type XDS struct {
	ListenIp string `ini:"listen_ip"`
	Port     string `ini:"port"`
}

XDS 与 envoy 相关配置, 添加一些默认选项

type XDSOption

type XDSOption struct {
}

Jump to

Keyboard shortcuts

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