loadbalance

package
v0.0.0-...-4168419 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

START: picker_builder

START: resolver_type

Index

Constants

View Source
const Name = "proglog"

Variables

This section is empty.

Functions

This section is empty.

Types

type Picker

type Picker struct {
	// contains filtered or unexported fields
}

func (*Picker) Build

func (p *Picker) Build(buildInfo base.PickerBuildInfo) balancer.Picker

func (*Picker) Pick

func (p *Picker) Pick(info balancer.PickInfo) (
	balancer.PickResult, error)

Pick is called by the gRPC to help it decide what subconnection to pick. The gRPS passes in PickInfo and receives back a PickResult. The PickInfo contains the full method name of the RPC call and the context of the call. The PickResult contains the subconnection to handle the call or an error.

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

The Resolver is a gRPC resolver because it implements the resolver.Resolver interface. It watches the cluster membership changes and updates the client connection accordingly.

func (*Resolver) Build

func (*Resolver) Close

func (r *Resolver) Close()

func (*Resolver) ResolveNow

func (r *Resolver) ResolveNow(resolver.ResolveNowOptions)

ResolveNow is called by gRPC to resolve the target name (in this case, just the service name) and update ClientConn with the resolved addresses.

func (*Resolver) Scheme

func (r *Resolver) Scheme() string

Jump to

Keyboard shortcuts

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