grpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BACK_OFF_MAX_DELAY = 3 * time.Second

BACK_OFF_MAX_DELAY is default max delay for exponential backoff algorithm

Variables

This section is empty.

Functions

func SetServiceDomain

func SetServiceDomain(domain string)

Types

type ServiceDesc

type ServiceDesc interface {
	GetConnection(opts ...grpc.DialOption) *grpc.ClientConn
	GetConnectionWithContext(ctx context.Context, opts ...grpc.DialOption) *grpc.ClientConn
	CloseConnection() error
}

func GetServiceDesc

func GetServiceDesc(alias string, c configs.GrpcConfig) ServiceDesc

type ServiceDescMock

type ServiceDescMock struct {
	mock.Mock
}

func (*ServiceDescMock) CloseConnection

func (s *ServiceDescMock) CloseConnection() error

func (*ServiceDescMock) GetConnection

func (s *ServiceDescMock) GetConnection(opts ...grpc.DialOption) *grpc.ClientConn

func (*ServiceDescMock) GetConnectionWithContext

func (s *ServiceDescMock) GetConnectionWithContext(ctx context.Context, opts ...grpc.DialOption) *grpc.ClientConn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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