conn

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GRPCOptionFuncs []GRPCOptionFunc

GRPCOptionFuncs is a combination of multiple gRPC dial option.

Functions

func Init

func Init(vp *viper.Viper) error

Init initializes common connection options. It MUST be called prior to any other package functions.

func New

func New(ctx context.Context, target string, dialTimeout time.Duration) (*grpc.ClientConn, error)

New creates a new gRPC client connection to the target.

func WithBasicAuth added in v0.12.0

func WithBasicAuth(username, password string) grpc.DialOption

WithBasicAuth configures basic authentication credentials for the connection.

Types

type GRPCOptionFunc

type GRPCOptionFunc func(vp *viper.Viper) (grpc.DialOption, error)

GRPCOptionFunc is a function that configures a gRPC dial option.

Jump to

Keyboard shortcuts

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