client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultPoolSize sets the connection pool size
	DefaultPoolSize = 100
	// DefaultPoolTTL sets the connection pool ttl
	DefaultPoolTTL = time.Minute
	// DefaultPoolMaxStreams maximum streams on a connectioin
	// (20)
	DefaultPoolMaxStreams = 20

	// DefaultPoolMaxIdle maximum idle conns of a pool
	// (50)
	DefaultPoolMaxIdle = 50

	// DefaultMaxRecvMsgSize maximum message that client can receive
	// (4 MB).
	DefaultMaxRecvMsgSize = 1024 * 1024 * 4

	// DefaultMaxSendMsgSize maximum message that client can send
	// (4 MB).
	DefaultMaxSendMsgSize = 1024 * 1024 * 4
)

Functions

This section is empty.

Types

type Client

type Client interface {
	grpc.ClientConnInterface
}

func New

func New(opts ...Option) (Client, error)

type Option

type Option func(*options)

func WithDialOptions added in v0.1.0

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

func WithName added in v0.1.0

func WithName(name string) Option

func WithRegistry

func WithRegistry(registry registry.Registry) Option

func WithSecure

func WithSecure(s bool) Option

func WithTLSConfig

func WithTLSConfig(conf *tls.Config) Option

func WithVersion

func WithVersion(version string) Option

type Options

type Options interface {
	Name() string
	Version() string
	Registry() registry.Registry
	TLSConfig() *tls.Config
	DialOptions() []grpc.DialOption
}

Jump to

Keyboard shortcuts

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