Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
// Timeouts
ReadTimeoutSec int64 `mapstructure:"read_timeout_sec"`
WriteTimeoutSec int64 `mapstructure:"write_timeout_sec"`
IdleTimeoutSec int64 `mapstructure:"idle_timeout_sec"`
WSReadTimeoutSec int64 `mapstructure:"ws_read_timeout_sec"`
WSWriteTimeoutSec int64 `mapstructure:"ws_write_timeout_sec"`
WSReadLimitBytes int64 `mapstructure:"ws_read_limit_bytes"`
// Default max inflights per consumer
DefaultMaxInflights int `mapstructure:"default_max_inflights"`
// Path to auth.yml file
AuthPath string `mapstructure:"auth_path"`
// TLS settings for API (HTTP/WebSocket)
TLSEnabled bool `mapstructure:"tls_enabled"`
CertPath string `mapstructure:"cert_path"`
KeyPath string `mapstructure:"key_path"`
}
type ClusterConfig ¶
type ClusterConfig struct {
// QUIC server (this proxy listens on)
QUICAddr string `mapstructure:"quic_addr"`
QUICPort int `mapstructure:"quic_port"`
// TLS settings for Cluster (QUIC)
CertPath string `mapstructure:"cert_path"`
KeyPath string `mapstructure:"key_path"`
CAPath string `mapstructure:"ca_path"`
DiscoveryKind string `mapstructure:"discovery_kind"`
DiscoveryYMLPath string `mapstructure:"discovery_yml_path"` // Required for DiscoveryKindStatic
DiscoveryHTTPHost string `mapstructure:"discovery_http_host"` // Required for DiscoveryKindHttp
}
type Config ¶
type Config struct {
// Proxy identification
ProxyID string `mapstructure:"-"`
// API Server
API APIConfig `mapstructure:"api"`
// Cluster Agent
Cluster ClusterConfig `mapstructure:"cluster"`
}
func LoadConfig ¶
LoadConfig loads configuration from file and binds CLI flags
func (*Config) GetAPIAddress ¶
GetAPIAddress returns the full API server address
func (*Config) GetQUICAddress ¶
GetQUICAddress returns the full QUIC server address
type DiscoveryKind ¶ added in v0.3.0
type DiscoveryKind uint8
const ( DiscoveryKindStatic DiscoveryKind = iota DiscoveryKindHttp )
func ParseDiscoveryKind ¶ added in v0.3.0
func ParseDiscoveryKind(s string) (DiscoveryKind, error)
ParseDiscoveryKind converts a string to DiscoveryKind
func (DiscoveryKind) String ¶ added in v0.3.0
func (d DiscoveryKind) String() string
String returns the string representation of DiscoveryKind
Click to show internal directories.
Click to hide internal directories.