client

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger *zap.Logger, endpoint string, options ...Option) (*grpc.ClientConn, error)

New create a grpc client conn

Types

type Option

type Option func(*option)

Option how setup client

func WithCredential

func WithCredential(credential credentials.TransportCredentials) Option

WithCredential setup credential for tls

func WithDialTimeout

func WithDialTimeout(timeout time.Duration) Option

WithDialTimeout setup the dial timeout

func WithKeepAlive

func WithKeepAlive(keepalive *keepalive.ClientParameters) Option

WithKeepAlive setup keepalive parameters

func WithMarshalJournal added in v1.0.12

func WithMarshalJournal() Option

WithMarshalJournal marshal journal to json string

func WithNotifyHandler added in v1.0.12

func WithNotifyHandler(handler func(desc, err, stack, journalID string)) Option

WithNotifyHandler notify when got panic

func WithResolverBuilder

func WithResolverBuilder(builder resolver.Builder) Option

WithResolverBuilder setup resolver builder

func WithSign

func WithSign(sign Sign) Option

WithSign setup the signature handler

type Sign

type Sign = interceptor.Sign

Sign signs the message

Jump to

Keyboard shortcuts

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