Name is the name of the priority balancer.
const Name = "priority_experimental"
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 )
DefaultSubBalancerCloseTimeout is defined as a variable instead of const for testing.
var DefaultSubBalancerCloseTimeout = 15 * time.Minute
Child is a child of priority balancer.
type Child struct { Config *internalserviceconfig.BalancerConfig `json:"config,omitempty"` IgnoreReresolutionRequests bool `json:"ignoreReresolutionRequests,omitempty"` }
LBConfig represents priority balancer's config.
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"` }