Documentation ¶
Index ¶
- Constants
- func InitializeConfigWatcher(ctx context.Context, logger *zap.SugaredLogger, handler configmap.Observer) error
- func InitializeObservability(ctx context.Context, logger *zap.SugaredLogger, metricsDomain string, ...) error
- func InitializeTracing(logger *zap.SugaredLogger, ctx context.Context, service string) error
- type EKDispatcherConfig
- type EKKafkaConfig
- type EKKafkaTopicConfig
- type EKKubernetesConfig
- type EKReceiverConfig
- type EventingKafkaConfig
Constants ¶
const ( // The name of the configmap used to hold eventing-kafka settings SettingsConfigMapName = "config-eventing-kafka" // The name of the keys in the Data section of the eventing-kafka configmap that holds Sarama and Eventing-Kafka configuration YAML SaramaSettingsConfigKey = "sarama" EventingKafkaSettingsConfigKey = "eventing-kafka" )
Package Constants
Variables ¶
This section is empty.
Functions ¶
func InitializeConfigWatcher ¶
func InitializeConfigWatcher(ctx context.Context, logger *zap.SugaredLogger, handler configmap.Observer) error
Initialize The Specified Context With A ConfigMap Watcher Much Of This Function Is Taken From The knative.dev sharedmain Package
func InitializeObservability ¶
func InitializeObservability(ctx context.Context, logger *zap.SugaredLogger, metricsDomain string, metricsPort int) error
Initialize The Specified Context With A Profiling Server (ConfigMap Watcher And HTTP Endpoint) Much Of This Function Is Taken From The knative.dev sharedmain Package
func InitializeTracing ¶
Initialize The Specified Context With A Tracer (ConfigMap Watcher) Assumes ctx Has K8S Client Injected Via LoggingContext (Or Similar)
Types ¶
type EKDispatcherConfig ¶
type EKDispatcherConfig struct {
EKKubernetesConfig
}
The Dispatcher config has the base Kubernetes fields (Cpu, Memory, Replicas) only
type EKKafkaConfig ¶
type EKKafkaConfig struct { EnableSaramaLogging bool `json:"enableSaramaLogging,omitempty"` Topic EKKafkaTopicConfig `json:"topic,omitempty"` AdminType string `json:"adminType,omitempty"` }
EKKafkaConfig contains items relevant to Kafka specifically, and the Sarama logging flag
type EKKafkaTopicConfig ¶
type EKKafkaTopicConfig struct { DefaultNumPartitions int32 `json:"defaultNumPartitions,omitempty"` DefaultReplicationFactor int16 `json:"defaultReplicationFactor,omitempty"` DefaultRetentionMillis int64 `json:"defaultRetentionMillis,omitempty"` }
EKKafkaTopicConfig contains some defaults that are only used if not provided by the channel spec
type EKKubernetesConfig ¶
type EKKubernetesConfig struct { CpuLimit resource.Quantity `json:"cpuLimit,omitempty"` CpuRequest resource.Quantity `json:"cpuRequest,omitempty"` MemoryLimit resource.Quantity `json:"memoryLimit,omitempty"` MemoryRequest resource.Quantity `json:"memoryRequest,omitempty"` Replicas int `json:"replicas,omitempty"` }
The EventingKafkaConfig and these EK sub-structs contain our custom configuration settings, stored in the config-eventing-kafka configmap. The sub-structs are explicitly declared so that they can have their own JSON tags in the overall EventingKafkaConfig
type EKReceiverConfig ¶
type EKReceiverConfig struct {
EKKubernetesConfig
}
The Receiver config has the base Kubernetes fields (Cpu, Memory, Replicas) only
type EventingKafkaConfig ¶
type EventingKafkaConfig struct { Receiver EKReceiverConfig `json:"receiver,omitempty"` Dispatcher EKDispatcherConfig `json:"dispatcher,omitempty"` Kafka EKKafkaConfig `json:"kafka,omitempty"` }
EventingKafkaConfig is the main struct that holds the Receiver, Dispatcher, and Kafka sub-items