Documentation
¶
Index ¶
- func LoadClusterConfig() (armometadata.ClusterConfig, error)
- func LoadServiceURLs(apiURL string) (schema.IBackendServices, error)
- type AuthenticationServerConfig
- type Backend
- type Config
- type DeduplicationConfig
- type FeaturesProviderConfig
- type HTTPEndpoint
- type InCluster
- type KafkaConfig
- type KeepAliveTaskConfig
- type MessageQueueConfig
- type PrometheusConfig
- type ReconciliationTaskConfig
- type ReplayConfig
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadClusterConfig ¶ added in v0.0.5
func LoadClusterConfig() (armometadata.ClusterConfig, error)
func LoadServiceURLs ¶ added in v0.0.5
func LoadServiceURLs(apiURL string) (schema.IBackendServices, error)
Types ¶
type AuthenticationServerConfig ¶ added in v0.0.5
type Backend ¶
type Backend struct {
Port int `mapstructure:"port"`
AuthenticationServer *AuthenticationServerConfig `mapstructure:"authenticationServer"`
Subscription string `mapstructure:"subscription"`
PulsarConfig *pulsarconfig.PulsarConfig `mapstructure:"pulsarConfig"`
ProducerTopic pulsarconnector.TopicName `mapstructure:"producerTopic"`
ConsumerTopic pulsarconnector.TopicName `mapstructure:"consumerTopic"`
ConsumerWorkers int `mapstructure:"consumerWorkers"`
Prometheus *PrometheusConfig `mapstructure:"prometheusConfig"`
ReconciliationTask *ReconciliationTaskConfig `mapstructure:"reconciliationTaskConfig"`
KeepAliveTask *KeepAliveTaskConfig `mapstructure:"keepAliveTaskConfig"`
SkipAlertsFrom []string `mapstructure:"skipAlertsFrom"`
FeaturesProvider *FeaturesProviderConfig `mapstructure:"featuresProvider"`
MessageQueue *MessageQueueConfig `mapstructure:"messageQueue"`
Replay *ReplayConfig `mapstructure:"replay"`
// MaxMessageBytes bounds one websocket message the server reads from a cluster, over
// all its frames. Unset, it follows the Kafka producer's maxMessageBytes, and without
// that the core default of 64 MiB.
MaxMessageBytes int `mapstructure:"maxMessageBytes"`
}
func (Backend) WebSocketMaxMessageBytes ¶ added in v0.0.173
WebSocketMaxMessageBytes is the largest websocket message the server reads: the configured value, else the Kafka producer's limit when one is set, else zero, which leaves the core default in place.
type Config ¶
type Config struct {
Backend Backend `mapstructure:"backend"`
InCluster InCluster `mapstructure:"inCluster"`
HTTPEndpoint HTTPEndpoint `mapstructure:"httpEndpoint"`
}
func LoadConfig ¶
LoadConfig reads configuration from file or environment variables.
type DeduplicationConfig ¶ added in v0.0.179
type DeduplicationConfig struct {
Disabled bool `mapstructure:"disabled"`
TTLSeconds int `mapstructure:"ttlSeconds"`
MaxMessages int `mapstructure:"maxMessages"`
}
func (*DeduplicationConfig) DeduplicationLimits ¶ added in v0.0.179
func (c *DeduplicationConfig) DeduplicationLimits() (ttlSeconds, maxMessages int)
DeduplicationLimits returns bounded-cache defaults even when the section is absent.
type FeaturesProviderConfig ¶ added in v0.0.136
type HTTPEndpoint ¶ added in v0.0.67
type HTTPEndpoint struct {
ServerPort string `mapstructure:"serverPort"`
Resources []Resource `mapstructure:"resources"`
}
func (*HTTPEndpoint) ValidateConfig ¶ added in v0.0.67
func (c *HTTPEndpoint) ValidateConfig() error
type InCluster ¶
type InCluster struct {
Deduplication *DeduplicationConfig `mapstructure:"deduplication"`
NamespaceFilterConfigMapName string `mapstructure:"namespaceFilterConfigMapName"`
ServerUrl string `mapstructure:"serverUrl"`
Namespace string `mapstructure:"namespace"`
ClusterName string `mapstructure:"clusterName"`
ExcludeNamespaces []string `mapstructure:"excludeNamespaces"`
IncludeNamespaces []string `mapstructure:"includeNamespaces"`
Account string `mapstructure:"account"`
AccessKey string `mapstructure:"accessKey"`
Resources []Resource `mapstructure:"resources"`
// MaxMessageBytes bounds one websocket message the client reads from the server, over
// all its frames; unset, the core default of 64 MiB applies. Raise it with the
// backend's maxMessageBytes when that one is raised.
MaxMessageBytes int `mapstructure:"maxMessageBytes"`
}
func (*InCluster) ValidateConfig ¶ added in v0.0.5
type KafkaConfig ¶ added in v0.0.155
type KafkaConfig struct {
BootstrapServers []string `mapstructure:"bootstrapServers"`
ProducerTopic string `mapstructure:"producerTopic"` // server produces here; carries cluster -> backend traffic (.out), consumed by the event ingester
ConsumerTopic string `mapstructure:"consumerTopic"` // server consumes here; carries backend -> cluster traffic (.in), produced by backend services
// false by default, since brokers usually auto-create on first produce. set it where
// auto-creation is off, so a missing topic fails startup instead of silently never syncing
RequireTopicsExist bool `mapstructure:"requireTopicsExist"`
GroupIDPrefix string `mapstructure:"groupIdPrefix"`
CompressionType string `mapstructure:"compressionType"` // default "zstd"
MaxMessageBytes int `mapstructure:"maxMessageBytes"` // default 67108864 (64 MB)
// securityProtocol is the authoritative selector: the SASL_ prefix enables SASL,
// the _SSL suffix enables TLS, and an empty value is treated as PLAINTEXT.
SecurityProtocol string `mapstructure:"securityProtocol"` // PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL
SASLMechanism string `mapstructure:"saslMechanism"` // PLAIN, SCRAM-SHA-256, SCRAM-SHA-512
SASLUsername string `mapstructure:"saslUsername"`
SASLPassword string `mapstructure:"saslPassword"` // rendered from a Secret by Helm
TLSCaCertPath string `mapstructure:"tlsCaCertPath"` // optional custom CA for the _SSL protocols
}
type KeepAliveTaskConfig ¶ added in v0.0.64
type KeepAliveTaskConfig struct {
TaskIntervalSeconds int `mapstructure:"taskIntervalSeconds"`
}
type MessageQueueConfig ¶ added in v0.0.155
type MessageQueueConfig struct {
Type string `mapstructure:"type"` // "kafka"
KafkaConfig *KafkaConfig `mapstructure:"kafkaConfig"`
}
MessageQueueConfig selects the message queue backend. When Type is set it takes precedence over the legacy top-level PulsarConfig; when it is absent the server falls back to PulsarConfig (see adapters/backend/v1/factory.go).
type PrometheusConfig ¶ added in v0.0.38
type ReconciliationTaskConfig ¶ added in v0.0.47
type ReconciliationTaskConfig struct {
CronSchedule string `mapstructure:"cronSchedule"` // when this is set, taskIntervalSeconds is ignored
TaskIntervalSeconds int `mapstructure:"taskIntervalSeconds"`
IntervalFromConnectionSeconds int `mapstructure:"intervalFromConnectionSeconds"`
SendBatch bool `mapstructure:"sendBatch"` // if true, a single message will be sent for all connected clients
// Positive enables a one-off request after connecting, with up to 20% additional jitter.
ReconcileAfterConnectSeconds int `mapstructure:"reconcileAfterConnectSeconds"`
}
type ReplayConfig ¶ added in v0.0.179
type ReplayConfig struct {
Enabled bool `mapstructure:"enabled"`
TTLSeconds int `mapstructure:"ttlSeconds"`
MaxMessages int `mapstructure:"maxMessages"`
MaxMessagesPerClient int `mapstructure:"maxMessagesPerClient"`
MaxBytes int `mapstructure:"maxBytes"`
}
ReplayConfig bounds the per-pod backlog for disconnected clients. Replay is opt-in; nonpositive limits use the documented defaults when Enabled is true.