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.

        Source Files

        Directories

        Path Synopsis