priority

package
v1.53.0-dev Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

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 exported for more users.

Index

Constants

View Source
const Name = "priority_experimental"

Name is the name of the priority balancer.

Variables

View Source
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
)

Functions

This section is empty.

Types

type Child

type Child struct {
	Config                     *internalserviceconfig.BalancerConfig `json:"config,omitempty"`
	IgnoreReresolutionRequests bool                                  `json:"ignoreReresolutionRequests,omitempty"`
}

Child is a child of priority balancer.

type LBConfig

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.

Jump to

Keyboard shortcuts

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