client

package
v0.1.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientAuto

func ClientAuto[t any](fun func(cc grpc.ClientConnInterface) t) func() t

func GetConn

func GetConn(serviceName string) (grpc.ClientConnInterface, error)

func NewClient

func NewClient[t any](serviceName string, fun func(cc grpc.ClientConnInterface) t) func() t

Types

type ClientConn added in v0.1.5

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

func (*ClientConn) Close added in v0.1.5

func (cc *ClientConn) Close() error

func (*ClientConn) Connect added in v0.1.5

func (cc *ClientConn) Connect()

func (*ClientConn) GetMethodConfig added in v0.1.5

func (cc *ClientConn) GetMethodConfig(method string) grpc.MethodConfig

func (*ClientConn) GetState added in v0.1.5

func (cc *ClientConn) GetState() connectivity.State

func (*ClientConn) Invoke added in v0.1.5

func (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...grpc.CallOption) error

func (*ClientConn) NewStream added in v0.1.5

func (cc *ClientConn) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

func (*ClientConn) ResetConnectBackoff added in v0.1.5

func (cc *ClientConn) ResetConnectBackoff()

func (*ClientConn) Target added in v0.1.5

func (cc *ClientConn) Target() string

func (*ClientConn) WaitForStateChange added in v0.1.5

func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connectivity.State) bool

Jump to

Keyboard shortcuts

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