grpcconfig

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 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) ConnectionLimit added in v0.41.0

func (x *Config) ConnectionLimit() int

ConnectionLimit returns the value of "conn_limit" config parameter.

Returns 0 if the value is not a positive integer.

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.

Jump to

Keyboard shortcuts

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