client

package
v1.0.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginsRoot = root + ".plugins"
)

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewClientConn

func NewClientConn(ctx context.Context, plugins ...Plugin) *grpc.ClientConn

func NewClientConnWithOptions

func NewClientConnWithOptions(ctx context.Context, options *Options, plugins ...Plugin) *grpc.ClientConn

Types

type Options

type Options struct {
	TLS struct {
		Enabled            bool
		CertFile           string
		KeyFile            string
		CAFile             string `config:"caFile"`
		InsecureSkipVerify bool
	} `config:"tls"`
	InitialWindowSize     int32
	InitialConnWindowSize int32
	Host                  string
	Block                 bool
	HostOverwrite         string
	Port                  int
	Keepalive             struct {
		Time                time.Duration
		Timeout             time.Duration
		PermitWithoutStream bool
	}
	ConnectParams struct {
		Backoff struct {
			BaseDelay  time.Duration
			Multiplier float64
			Jitter     float64
			MaxDelay   time.Duration
		}
		MinConnectTimeout time.Duration
	}
}

func NewOptions

func NewOptions() (*Options, error)

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

type Plugin

type Plugin func(ctx context.Context) ([]grpc.DialOption, []grpc.CallOption)

Jump to

Keyboard shortcuts

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