Documentation
¶
Index ¶
Constants ¶
const DefaultKeepaliveMinTime = 10 * time.Second
const DefaultReconnectInterval = time.Minute
Variables ¶
This section is empty.
Functions ¶
func IterateEndpoints ¶
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 ¶
Config is a wrapper over the config section which provides access to gRPC server configurations.
func (*Config) Endpoint ¶
Endpoint returns the value of "endpoint" config parameter.
Panics if the value is not a non-empty string.
func (*Config) KeepaliveEnforcementPolicy ¶ added in v0.47.7
func (x *Config) KeepaliveEnforcementPolicy() *KeepaliveEnforcementPolicy
KeepaliveEnforcementPolicy returns "keepalive_enforcement_policy" subsection as a KeepaliveEnforcementPolicy.
Returns nil if "enabled" value of "keepalive_enforcement_policy" subsection is false.
type KeepaliveEnforcementPolicy ¶ added in v0.47.7
type KeepaliveEnforcementPolicy struct {
// contains filtered or unexported fields
}
KeepaliveEnforcementPolicy is a wrapper over the config section which provides access to option to set keepalive enforcement policy on the server-side. Server will close connection with a client that violates this policy.
func (*KeepaliveEnforcementPolicy) MinTime ¶ added in v0.47.7
func (k *KeepaliveEnforcementPolicy) MinTime() time.Duration
MinTime returns the value of "min_time" config parameter.
Returns DefaultKeepaliveMinTime if value is not defined or invalid.
func (*KeepaliveEnforcementPolicy) PermitWithoutStream ¶ added in v0.47.7
func (k *KeepaliveEnforcementPolicy) PermitWithoutStream() bool
PermitWithoutStream returns the value of "permit_without_stream" config parameter.
Returns false if the value isn't specified.
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 ¶
CertificateFile returns the value of "certificate" config parameter.
Panics if the value is not a non-empty string.
func (TLSConfig) KeyFile ¶
KeyFile returns the value of "key" config parameter.
Panics if the value is not a non-empty string.
func (TLSConfig) UseInsecureCrypto ¶
UseInsecureCrypto returns true if TLS 1.2 cipher suite should not be restricted.