Documentation
¶
Overview ¶
Package reminder contains configuration options for the reminder service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerFromConfigFlags ¶
func LoggerFromConfigFlags(cfg LoggingConfig) zerolog.Logger
LoggerFromConfigFlags creates a new logger from the provided configuration
func RegisterReminderFlags ¶
RegisterReminderFlags registers the flags for the minder cli
func SetViperDefaults ¶
SetViperDefaults sets the default values for the configuration to be picked up by viper
Types ¶
type Config ¶
type Config struct {
Database config.DatabaseConfig `mapstructure:"database"`
RecurrenceConfig RecurrenceConfig `mapstructure:"recurrence"`
EventConfig serverconfig.EventConfig `mapstructure:"events"`
LoggingConfig LoggingConfig `mapstructure:"logging"`
MetricsConfig serverconfig.MetricsConfig `mapstructure:"metrics"`
MetricServer serverconfig.MetricServerConfig `mapstructure:"metric_server" default:"{\"port\":\"9091\"}"`
}
Config contains the configuration for the reminder service
type LoggingConfig ¶
type LoggingConfig struct {
Level string `mapstructure:"level" default:"info"`
}
LoggingConfig is the configuration for the logger
type RecurrenceConfig ¶
type RecurrenceConfig struct {
// Interval is the time between reminders
Interval time.Duration `mapstructure:"interval" default:"1h"`
// BatchSize is the number of reminders to process at once. Batch size cannot be less than
// MaxPerProject * MinProjectFetchLimit.
BatchSize int `mapstructure:"batch_size" default:"100"`
// MinElapsed is the minimum time after last update before sending a reminder
MinElapsed time.Duration `mapstructure:"min_elapsed" default:"1h"`
}
RecurrenceConfig contains the configuration for the reminder recurrence
func (RecurrenceConfig) Validate ¶
func (r RecurrenceConfig) Validate() error
Validate checks that the recurrence config is valid
Click to show internal directories.
Click to hide internal directories.