Documentation ¶
Index ¶
- Constants
- func FromNameContext(ctx context.Context) (string, bool)
- func FromParamContext(ctx context.Context) (string, bool)
- func FromTargetContext(ctx context.Context) (string, bool)
- func NewNameContext(ctx context.Context, name string) context.Context
- func NewParamContext(ctx context.Context, addr string) context.Context
- func NewTargetContext(ctx context.Context, name string) context.Context
- func RegisterPicker(builder Picker)
- type Matcher
- type Picker
- type PickerBuildInfoString
Constants ¶
View Source
const ( Mix = "mix" // consistent 和 其他注册balancer算法 的混合体 Consistent = "consistent" //一致性hash )
Variables ¶
This section is empty.
Functions ¶
func NewNameContext ¶
NewNameContext 设置balance负载的名字, mix负载会根据该名字选择其他balance
func NewParamContext ¶
NewParamContext 用于balance负载的参数
func NewTargetContext ¶
NewTargetContext 设置target目标服务的名字
func RegisterPicker ¶
func RegisterPicker(builder Picker)
Types ¶
type PickerBuildInfoString ¶
type PickerBuildInfoString base.PickerBuildInfo
func (PickerBuildInfoString) String ¶
func (p PickerBuildInfoString) String() string
Click to show internal directories.
Click to hide internal directories.