Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSConfig ¶
type Config ¶
type Config struct {
LogLevel logger.LevelDecoder `split_words:"true" default:"info"`
ConsoleLog bool `split_words:"true" default:"false"`
CloseTimeout time.Duration `split_words:"true" default:"30s"`
FeedSync FeedSyncConfig `split_words:"true"`
PostFetch PostFetchConfig `split_words:"true"`
Monitoring MonitoringConfig
Publisher PublisherConfig
Subscriber SubscriberConfig
// contains filtered or unexported fields
}
Config contains all of the configuration parameters for an Baleen service and is loaded from the environment or a configuration file with reasonable defaults for values that are omitted. The Config should be validated in preparation for running Baleen to ensure that all eventing operations work as expected. TODO: collect the config from a file instead of the environment.
func (Config) GetLogLevel ¶
Parse and return the zerolog log level for configuring global logging.
func (Config) IsZero ¶
A Config is zero-valued if it hasn't been processed by a file or the environment.
func (Config) RouterConfig ¶
func (c Config) RouterConfig() message.RouterConfig
Returns the Watermill RouterConfig=
type EnsignConfig ¶
type FeedSyncConfig ¶
type KafkaConfig ¶
type KafkaConfig struct {
Enabled bool `default:"false"`
URL string `split_words:"true"`
Balancer string `default:"LeastBytes"`
TopicDocuments string `default:"documents"`
TopicFeeds string `default:"feeds"`
}
func (KafkaConfig) Validate ¶
func (c KafkaConfig) Validate() (err error)
Validate the Kafka config.
type MonitoringConfig ¶
type MonitoringConfig struct {
Enabled bool `default:"true"`
BindAddr string `split_words:"true" default:":1205"`
NodeID string `split_words:"true" required:"false"`
}
MonitoringConfig maintains the parameters for the metrics server that the Prometheus scraper will fetch the configured observability metrics from.
type PostFetchConfig ¶
type PostFetchConfig struct {
Enabled bool `default:"false"`
}
type PublisherConfig ¶
type PublisherConfig struct {
Ensign EnsignConfig
Kafka KafkaConfig
}
Publisher Config defines the type of configuration to connect to the publisher with.
func (PublisherConfig) Validate ¶
func (c PublisherConfig) Validate() error
type SubscriberConfig ¶
type SubscriberConfig struct {
Ensign EnsignConfig
Kafka KafkaConfig
}
Subscriber Config defines the type of configuration to connect to the publisher with.
func (SubscriberConfig) Validate ¶
func (c SubscriberConfig) Validate() error