priority
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package priority implements the priority balancer.
This balancer will be kept in internal until we use it in the xds balancers,and are confident its functionalities are stable. It will then be exportedfor more users.
Index¶
Constants¶
const Name = "priority_experimental"Name is the name of the priority balancer.
Variables¶
var (// ErrAllPrioritiesRemoved is returned by the picker when there's no priority available.ErrAllPrioritiesRemoved =errors.New("no priority is provided, all priorities are removed")// DefaultPriorityInitTimeout is the timeout after which if a priority is// not READY, the next will be started. It's exported to be overridden by// tests.DefaultPriorityInitTimeout = 10 *time.Second)
var DefaultSubBalancerCloseTimeout = 15 *time.MinuteDefaultSubBalancerCloseTimeout is defined as a variable instead of const fortesting.
Functions¶
This section is empty.
Types¶
typeChild¶
type Child struct {Config *internalserviceconfig.BalancerConfig `json:"config,omitempty"`IgnoreReresolutionRequestsbool `json:"ignoreReresolutionRequests,omitempty"`}Child is a child of priority balancer.
typeLBConfig¶
type LBConfig struct {serviceconfig.LoadBalancingConfig `json:"-"`// Children is a map from the child balancer names to their configs. Child// names can be found in field Priorities.Children map[string]*Child `json:"children,omitempty"`// Priorities is a list of child balancer names. They are sorted from// highest priority to low. The type/config for each child can be found in// field Children, with the balancer name as the key.Priorities []string `json:"priorities,omitempty"`}LBConfig represents priority balancer's config.