grpcconfig

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterateEndpoints added in v0.22.0

func IterateEndpoints(c *config.Config, f func(*Config))

IterateEndpoints iterates over subsections of "grpc" section of c, wrap them into Config and passes to f.

Section names are expected to be consecutive integer numbers, starting from 0.

Panics if N is not a positive number.

Types

type Config added in v0.22.0

type Config config.Config

Config is a wrapper over the config section which provides access to gRPC server configurations.

func (*Config) Endpoint added in v0.22.0

func (x *Config) Endpoint() string

Endpoint returns the value of "endpoint" config parameter.

Panics if the value is not a non-empty string.

func (*Config) TLS added in v0.22.0

func (x *Config) TLS() *TLSConfig

TLS returns "tls" subsection as a TLSConfig.

Returns nil if "enabled" value of "tls" subsection is false.

type TLSConfig

type TLSConfig struct {
	// contains filtered or unexported fields
}

TLSConfig is a wrapper over the config section which provides access to TLS configurations of the gRPC server.

func (TLSConfig) CertificateFile

func (tls TLSConfig) CertificateFile() string

CertificateFile returns the value of "certificate" config parameter.

Panics if the value is not a non-empty string.

func (TLSConfig) KeyFile

func (tls TLSConfig) KeyFile() string

KeyFile returns the value of "key" config parameter.

Panics if the value is not a non-empty string.

func (TLSConfig) UseInsecureCrypto added in v0.27.0

func (tls TLSConfig) UseInsecureCrypto() bool

UseInsecureCrypto returns true if TLS 1.2 cipher suite should not be restricted.

Jump to

Keyboard shortcuts

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