grpcclient

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package grpcclient provides a common configuration for specifying clients of grpc services. It includes setup hooks for default interceptors like deadlines, retry policies, auth etc as well as a common Options struct for identifying backends and their connection settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Address is the endpoint address of the service.
	Address string
	// DefaultTimeoutMs is the default timeout for calls to this service.
	DefaultTimeoutMs int
}

Options defines how to connect to a service.

func (*Options) DefaultClientOptions

func (c *Options) DefaultClientOptions(ctx context.Context) ([]option.ClientOption, error)

DefaultClientOptions returns grpc client options used for creating new instances of clients. TODO: Add monitoring interceptor for tsmon, stackdriver, prometheus etc as needed. TODO: Add throttling.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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