Documentation ¶
Index ¶
- Constants
- func ConfigAdd(path string)
- func NewClientConn(ctx context.Context, plugins ...Plugin) *grpc.ClientConn
- func NewClientConnWithConfigPath(ctx context.Context, path string) (*grpc.ClientConn, error)
- func NewClientConnWithOptions(ctx context.Context, options *Options, plugins ...Plugin) *grpc.ClientConn
- type KeepAliveOptions
- type Options
- type Plugin
- type TLSOptions
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
func NewClientConn ¶
func NewClientConn(ctx context.Context, plugins ...Plugin) *grpc.ClientConn
NewClientConn returns a new grpc client connection.
func NewClientConnWithConfigPath ¶
NewClientConnWithConfigPath returns a new grpc client connection with options from config path.
func NewClientConnWithOptions ¶
func NewClientConnWithOptions(ctx context.Context, options *Options, plugins ...Plugin) *grpc.ClientConn
NewClientConnWithOptions returns a new grpc client connection with options.
Types ¶
type KeepAliveOptions ¶
type Options ¶
type Options struct { TLS TLSOptions `config:"tls"` InitialWindowSize int32 InitialConnWindowSize int32 Host string Block bool HostOverwrite string Port int Keepalive KeepAliveOptions ConnectParams struct { Backoff struct { BaseDelay time.Duration Multiplier float64 Jitter float64 MaxDelay time.Duration } MinConnectTimeout time.Duration } }
Options grpc client options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
type Plugin ¶
type Plugin func(ctx context.Context) ([]grpc.DialOption, []grpc.CallOption)
Plugin defines a function to process plugin.
Click to show internal directories.
Click to hide internal directories.