Movatterモバイル変換


[0]ホーム

URL:


stub

package
v1.77.0Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License:Apache-2.0Imports:4Imported by:0

Details

Repository

github.com/grpc/grpc-go

Links

Documentation

Overview

Package stub implements a balancer for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcRegister

func Register(namestring, bfBalancerFuncs)

Register registers a stub balancer builder which will call the providedfunctions. The name used should be unique.

Types

typeBalancerData

type BalancerData struct {// ClientConn is set by the builder.ClientConnbalancer.ClientConn// BuildOptions is set by the builder.BuildOptionsbalancer.BuildOptions// ChildBalancer holds a child balancer.ChildBalancerbalancer.Balancer}

BalancerData contains data relevant to a stub balancer.

typeBalancerFuncs

type BalancerFuncs struct {// Init is called after ClientConn and BuildOptions are set in// BalancerData.  It may be used to initialize BalancerData.Data.Init func(*BalancerData)// ParseConfig is used for parsing LB configs, if specified.ParseConfig func(json.RawMessage) (serviceconfig.LoadBalancingConfig,error)UpdateClientConnState func(*BalancerData,balancer.ClientConnState)errorResolverError         func(*BalancerData,error)Close                 func(*BalancerData)ExitIdle              func(*BalancerData)}

BalancerFuncs contains all balancer.Balancer functions with a preceding*BalancerData parameter for passing additional instance information. Anynil functions will never be called.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp