package balancer
import "github.com/ydb-platform/ydb-go-sdk/v3/balancer"
Index ¶
- func Default() ibalancer.Balancer
- func PreferLocalDC(balancer ibalancer.Balancer) ibalancer.Balancer
- func PreferLocalDCWithFallBack(balancer ibalancer.Balancer) ibalancer.Balancer
- func PreferLocations(balancer ibalancer.Balancer, locations ...string) ibalancer.Balancer
- func PreferLocationsWithFallback(balancer ibalancer.Balancer, locations ...string) ibalancer.Balancer
- func RandomChoice() ibalancer.Balancer
- func RoundRobin() ibalancer.Balancer
- func SingleConn() ibalancer.Balancer
Functions ¶
func Default ¶
func PreferLocalDC ¶
PreferLocalDC creates balancer which use endpoints only in location such as initial endpoint location Balancer "balancer" defines balancing algorithm between endpoints selected with filter by location
func PreferLocalDCWithFallBack ¶
PreferLocalDCWithFallBack creates balancer which use endpoints only in location such as initial endpoint location Balancer "balancer" defines balancing algorithm between endpoints selected with filter by location If filter returned zero endpoints from all discovery endpoints list - used all endpoint instead
func PreferLocations ¶
PreferLocations creates balancer which use endpoints only in selected locations (such as "MAN", "VLA", etc.) Balancer "balancer" defines balancing algorithm between endpoints selected with filter by location
func PreferLocationsWithFallback ¶
func PreferLocationsWithFallback(balancer ibalancer.Balancer, locations ...string) ibalancer.Balancer
PreferLocationsWithFallback creates balancer which use endpoints only in selected locations Balancer "balancer" defines balancing algorithm between endpoints selected with filter by location If filter returned zero endpoints from all discovery endpoints list - used all endpoint instead
func RandomChoice ¶
func RoundRobin ¶
func SingleConn ¶
Source Files ¶
- Version
- v3.7.2
- Published
- Jan 17, 2022
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 4 minutes ago –
Tools for package owners.