grpcclient

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(
	addr string,
	opt ...OptionConn,
) (
	*grpc.ClientConn,
	error,
)

NewConn creates a client connection to the given addr.

Types

type OptionConn

type OptionConn interface {
	// contains filtered or unexported methods
}

OptionConn configures how we set up the connection.

func WithClientUnaryInterceptor added in v0.0.14

func WithClientUnaryInterceptor(interceptor grpc.UnaryClientInterceptor) OptionConn

WithClientUnaryInterceptor adds an interceptor for client calls.

func WithContextDialer

func WithContextDialer(
	d func(context.Context, string) (net.Conn, error),
) OptionConn

WithContextDialer wraps the grpc.WithContextDialer option.

func WithNoTLS

func WithNoTLS() OptionConn

WithNoTLS disables transport security for the client. Replacement for grpc.WithInsecure().

Jump to

Keyboard shortcuts

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