config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name                 string `yaml:"name"`
	ResolverType         string `yaml:"resolver_type"`
	RefreshIntervalInSec int    `yaml:"refresh_interval_in_sec"`
	Address              string `yaml:"address"`
	NameSpace            string `yaml:"name_space"`
	Port                 uint32 `yaml:"port"`
	LbPolicy             string `yaml:"lb_policy"`
	MaxRequests          uint32 `yaml:"max_requests"`
	Retry                Retry  `yaml:"retry"`
}

Cluster a specific clluster config

type ControllerConfig

type ControllerConfig struct {
	NodeId               string     `yaml:"node_id"`
	LogDebug             bool       `yaml:"log_debug"`
	MaxConcurrentStreams int        `yaml:"max_concurrent_streams"`
	ListenerPort         int        `yaml:"listener_port"`
	PrometheusPort       int        `yaml:"prometheus_port"`
	Clusters             []*Cluster `yaml:"clusters"`
}

ControllerConfig cretes a list of services that are configured

func LoadConfig

func LoadConfig() *ControllerConfig

LoadConfig initializes and parses yaml fileinto struct

type Retry added in v0.4.0

type Retry struct {
	Enabled                 bool   `yaml:"enabled"`
	RetryOn                 string `yaml:"retry_on"`
	NumRetries              uint32 `yaml:"num_retries"`
	BackoffIntervalInSec    uint32 `yaml:"backoff_interval_in_sec"`
	BackoffMaxIntervalInSec uint32 `yaml:"backoff_max_interval_in_sec"`
}

Retry Configuration specific to a cluster

Jump to

Keyboard shortcuts

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