grpcclient

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 6 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().

func WithOTEL added in v0.0.24

func WithOTEL(handlerOptions ...otelgrpc.Option) OptionConn

WithOTEL adds OpenTelemetry instrumentation to the client.

Jump to

Keyboard shortcuts

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