Documentation ¶
Index ¶
- Constants
- Variables
- func DialOptionsForRegistry(reg registry.Registry, options ...grpc.DialOption) []grpc.DialOption
- func GetClientConnFromCtx(ctx context.Context, serviceName string, opt ...Option) grpc.ClientConnInterface
- func MetaStreamClientInterceptor() grpc.StreamClientInterceptor
- func MetaUnaryClientInterceptor() grpc.UnaryClientInterceptor
- func NewBuilder(reg registry.Registry, oo ...client.BalancerOption) resolver.Builder
- func NewClientConn(serviceName string, opt ...Option) grpc.ClientConnInterface
- func RegisterMock(serviceName string, mock grpc.ClientConnInterface)
- type HealthMonitor
- type Option
- type Options
Constants ¶
View Source
const BalancerRoundRobin = "cells-robin-"
Variables ¶
View Source
var ( CallTimeoutShort = 1 * time.Second WarnMissingConnInContext = false )
Functions ¶
func DialOptionsForRegistry ¶
func DialOptionsForRegistry(reg registry.Registry, options ...grpc.DialOption) []grpc.DialOption
func GetClientConnFromCtx ¶
func MetaStreamClientInterceptor ¶
func MetaStreamClientInterceptor() grpc.StreamClientInterceptor
func MetaUnaryClientInterceptor ¶
func MetaUnaryClientInterceptor() grpc.UnaryClientInterceptor
func NewBuilder ¶
func NewClientConn ¶
func NewClientConn(serviceName string, opt ...Option) grpc.ClientConnInterface
NewClientConn returns a client attached to the defaults.
func RegisterMock ¶
func RegisterMock(serviceName string, mock grpc.ClientConnInterface)
RegisterMock registers a stubbed ClientConnInterface for a given service
Types ¶
type HealthMonitor ¶ added in v4.0.1
HealthMonitor blocks a connection to a specific service health
func NewHealthChecker ¶ added in v4.0.1
func NewHealthChecker(c context.Context) HealthMonitor
type Option ¶
type Option func(*Options)
func WithCallTimeout ¶
func WithClientConn ¶
func WithClientConn(c grpc.ClientConnInterface) Option
func WithDialOptions ¶
func WithDialOptions(opts ...grpc.DialOption) Option
func WithPeerSelector ¶
func WithRegistry ¶
type Options ¶
type Options struct { ClientConn grpc.ClientConnInterface Registry registry.Registry CallTimeout time.Duration DialOptions []grpc.DialOption BalancerFilter client.BalancerTargetFilter }
Click to show internal directories.
Click to hide internal directories.