package pickfirstleaf
import "google.golang.org/grpc/balancer/pickfirst/pickfirstleaf"
Package pickfirstleaf contains the pick_first load balancing policy which will be the universal leaf policy after dualstack changes are implemented.
Experimental
Notice: This package is EXPERIMENTAL and may be changed or removed in a later release.
Index ¶
- Variables
- func EnableHealthListener(state resolver.State) resolver.State
- func IsManagedByPickfirst(addr resolver.Address) bool
Variables ¶
var ( // Name is the name of the pick_first_leaf balancer. // It is changed to "pick_first" in init() if this balancer is to be // registered as the default pickfirst. Name = "pick_first_leaf" )
Functions ¶
func EnableHealthListener ¶
EnableHealthListener updates the state to configure pickfirst for using a generic health listener.
func IsManagedByPickfirst ¶
IsManagedByPickfirst returns whether an address belongs to a SubConn managed by the pickfirst LB policy. TODO: https://github.com/grpc/grpc-go/issues/7915 - This is a hack to disable outlier_detection via the with connectivity listener when using pick_first. Once Dualstack changes are complete, all SubConns will be created by pick_first and outlier detection will only use the health listener for ejection. This hack can then be removed.
Source Files ¶
pickfirstleaf.go
- Version
- v1.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 17 packages
- Last checked
- 17 hours ago –
Tools for package owners.