Documentation
¶
Index ¶
- Constants
- func GetConfigContents(key string) (string, error)
- func GetConfigFilePath(key string) (string, error)
- func GetEgressEndpoints() string
- func Init() error
- func InitProtocols() error
- func SetConfig(nc *MesherConfig)
- func SetKeyValueByFile(key, f string) string
- type Admin
- type Egress
- type EgressConfig
- type EgressPort
- type EgressRule
- type HealthCheck
- type Match
- type MesherConfig
- type PProf
- type Plugin
- type Policy
Constants ¶
View Source
const ( ConfFile = "mesher.yaml" EgressConfFile = "egress.yaml" )
Constant for mesher conf file
Variables ¶
This section is empty.
Functions ¶
func GetConfigContents ¶
GetConfigContents returns config contents
func GetConfigFilePath ¶
GetConfigFilePath returns config file path
func GetEgressEndpoints ¶
func GetEgressEndpoints() string
GetEgressEndpoints returns the pilot address
func SetConfig ¶
func SetConfig(nc *MesherConfig)
SetConfig sets new mesher config from input config
func SetKeyValueByFile ¶
SetKeyValueByFile reads mesher.yaml and gets key and value
Types ¶
type Admin ¶
type Admin struct {
Enable bool `yaml:"enable"`
ServerURI string `yaml:"serverUri"`
GoRuntimeMetrics bool `yaml:"goRuntimeMetrics"`
}
Admin has attributes for enabling, serverURI and metrics for admin data
type EgressConfig ¶
type EgressConfig struct {
Egress Egress `yaml:"egress"`
Destinations map[string][]*EgressRule `yaml:"egressRule"`
}
EgressConfig is the struct having info about egress rule destinations
type EgressPort ¶
EgressPort protocol and the corresponding port
type EgressRule ¶
type EgressRule struct {
Hosts []string `yaml:"hosts"`
Ports []*EgressPort `yaml:"ports"`
}
EgressRule has hosts and ports information
type HealthCheck ¶
type HealthCheck struct {
Port string `yaml:"port"`
Protocol string `yaml:"protocol"`
URI string `yaml:"uri"`
Interval string `yaml:"interval"`
Match *Match `yaml:"match"`
}
HealthCheck define how to check local ports
type MesherConfig ¶
type MesherConfig struct {
PProf *PProf `yaml:"pprof"`
Plugin *Plugin `yaml:"plugin"`
Admin Admin `yaml:"admin"`
HealthCheck []*HealthCheck `yaml:"localHealthCheck"`
ProxyedPro string `yaml:"proxyedProtocol"`
}
MesherConfig has all mesher config
Click to show internal directories.
Click to hide internal directories.