Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectGRPC ¶
func ConnectGRPC(config GRPCConfig) (*grpc.ClientConn, error)
ConnectGRPC creates a production-ready gRPC client connection.
Configuration: - TLS is enabled by default; set `grpc_config.insecure` to disable. - Backoff parameters can be customized under `grpc_config` in YAML. - Keepalive is configured to maintain healthy connections under high load.
Production optimizations: - Keepalive pings detect dead connections quickly - Exponential backoff for connection retries - Increased flow control windows for high throughput - Large message sizes for batch operations
Types ¶
type GRPCConfig ¶
type GRPCConfig struct {
HostPort string `yaml:"host_port"`
Insecure bool `yaml:"insecure"`
BackoffBaseDelay time.Duration `yaml:"backoff_base_delay"`
BackoffMaxDelay time.Duration `yaml:"backoff_max_delay"`
MinConnectTimeout time.Duration `yaml:"min_connect_timeout"`
KeepAliveTime time.Duration `yaml:"keep_alive_time"`
KeepAliveTimeout time.Duration `yaml:"keep_alive_timeout"`
}
func (*GRPCConfig) HydrateDefaults ¶
func (c *GRPCConfig) HydrateDefaults() GRPCConfig
Click to show internal directories.
Click to hide internal directories.