grpc_client

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any](
	config Config,
	logger logger,
	fn func(cc grpc.ClientConnInterface) T,
	opts ...Option,
) (T, error)

Types

type Config

type Config struct {
	Enabled bool   `default:"true" usage:"allows to enable grpc client"`
	Name    string `default:"nameless-grpc-client"`
	Addr    string `validate:"hostname_port" usage:"grpc server address"`
	UseTls  bool
	// contains filtered or unexported fields
}

Config provides configuration for grpc cleint.

type Option

type Option func(s *Config)

func WithGrpcOpt

func WithGrpcOpt(opts ...grpc.DialOption) Option

func WithName

func WithName(v string) Option

Jump to

Keyboard shortcuts

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