Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Log is the logging config
Log cconfig.Logger `yaml:"log"`
// Service the service config
Service Service `yaml:"service"`
// Kafka is the config for connecting to kafka
Kafka cconfig.KafkaConfig `yaml:"kafka"`
}
Config contains the configuration for a set of cadence services
type Delivery ¶
type Delivery struct {
// an enum that supports "webhook"
Method string `yaml:"method"`
// required when method is "webhook", defines how to deliver notification via webhook
Webhook Webhook `yaml:"webhook"`
}
Delivery defines how to deliver the notification
type Filter ¶
type Filter struct {
// filtering based on domains -- notifications of which domain can be sent. Empty means selecting all
SelectedDomains []string `yaml:"selectedDomains"`
}
type KafkaConsumer ¶
type KafkaConsumer struct {
// Kafka consumer group name
ConsumerGroup string `yaml:"consumerGroup"`
// Kafka topic to send DLQ after maxing out retries
ConsumerGroupDlqTopic string `yaml:"consumerGroupDlqTopic"`
// "newest" or "oldest" for consumer group first time to consume
InitialOffset string `yaml:"initialOffset"`
// concurrency per app per host, default to 10
Concurrency int `yaml:"concurrency"`
}
KafkaConsumer defines a consumer from the Kafka topic
type Service ¶
type Service struct {
// Metrics is the metrics subsystem configuration
Metrics cconfig.Metrics `yaml:"metrics"`
// Subscribers is the config for delivering notifications to different subscribers
Subscribers []Subscriber `yaml:"subscribers"`
}
Service contains the service specific config items
type Subscriber ¶
type Subscriber struct {
// name of an subscriber application
Name string `yaml:"name"`
// Consumer defines a consumer from the Kafka topic
Consumer KafkaConsumer `yaml:"consumer"`
// Delivery defines how to deliver the notification
Delivery Delivery `yaml:"delivery"`
// filtering notification
Filter Filter `yaml:"filter"`
}
Subscriber contains config to deliver notifications
type Webhook ¶
type Webhook struct {
// Callback REST URL. See README for callback request format.
URL url.URL `yaml:"url"`
// interval for retry when not receiving 200 from callback
RetryInterval time.Duration `yaml:"retryInterval"`
// max number of retries on error(not receiving 200)
MaxRetries int `yaml:"maxRetries"`
// context timeout of callback requests
CallbackRequestTimeout time.Duration `yaml:"callbackRequestTimeout"`
}
Click to show internal directories.
Click to hide internal directories.