balancer

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package balancer adapts onexmesh's selector to a gRPC balancer so the framework's load-balancing strategies (round_robin, weighted, p2c, ...) are used by the gRPC client instead of grpc's built-in balancers.

Index

Constants

View Source
const Name = "onexmesh_selector"

Name is the registered gRPC balancer name referenced by the client's default service config.

View Source
const ServiceKey = "onexmesh.selector.service"

ServiceKey is the resolver address attribute key carrying the service name, used to key per-service selector state so strategies like p2c keep their adaptive state across picker rebuilds without leaking between services.

View Source
const StrategyKey = "onexmesh.selector.strategy"

StrategyKey is the resolver address attribute key carrying the selector strategy (e.g. "round_robin", "weighted", "p2c").

View Source
const WeightKey = "onexmesh.selector.weight"

WeightKey is the resolver address attribute key carrying the node's static weight, so the weighted selector strategy works on the gRPC path (not just HTTP).

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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