Documentation ¶
Index ¶
- 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) resolver.Builder
- func NewClientConn(serviceName string, opt ...Option) grpc.ClientConnInterface
- func RegisterMock(serviceName string, mock grpc.ClientConnInterface)
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CallTimeoutDefault = 10 * time.Minute CallTimeoutShort = 1 * time.Second )
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 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 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 SubConnSelector subConnInfoFilter }
Click to show internal directories.
Click to hide internal directories.