Version: v0.3.0 Latest Latest

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0



Package configgrpc defines the gRPC configuration settings.



This section is empty.


This section is empty.


func GrpcSettingsToDialOptions added in v0.2.2

func GrpcSettingsToDialOptions(settings GRPCSettings) ([]grpc.DialOption, error)

GrpcSettingsToDialOptions maps configgrpc.GRPCSettings to a slice of dial options for gRPC


type GRPCSettings

type GRPCSettings struct {
	// The headers associated with gRPC requests.
	Headers map[string]string `mapstructure:"headers"`

	// The target to which the exporter is going to send traces or metrics,
	// using the gRPC protocol. The valid syntax is described at
	Endpoint string `mapstructure:"endpoint"`

	// The compression key for supported compression types within
	// collector. Currently the only supported mode is `gzip`.
	Compression string `mapstructure:"compression"`

	// Certificate file for TLS credentials of gRPC client. Should
	// only be used if `secure` is set to true.
	CertPemFile string `mapstructure:"cert_pem_file"`

	// Whether to enable client transport security for the exporter's gRPC
	// connection. See
	UseSecure bool `mapstructure:"secure"`

	// Authority to check against when doing TLS verification
	ServerNameOverride string `mapstructure:"server_name_override"`

	// The keepalive parameters for client gRPC. See grpc.WithKeepaliveParams
	// (
	KeepaliveParameters *KeepaliveConfig `mapstructure:"keepalive"`

GRPCSettings defines common settings for a gRPC configuration.

type KeepaliveConfig

type KeepaliveConfig struct {
	Time                time.Duration `mapstructure:"time,omitempty"`
	Timeout             time.Duration `mapstructure:"timeout,omitempty"`
	PermitWithoutStream bool          `mapstructure:"permit_without_stream,omitempty"`

KeepaliveConfig exposes the keepalive.ClientParameters to be used by the exporter. Refer to the original data-structure for the meaning of each parameter.

Source Files

Jump to

Keyboard shortcuts

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