Documentation
¶
Overview ¶
Package river provides a set of tools for working with riverqueue
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Logger configuration, which is inherited from the core logger
Logger Logger `koanf:"-" json:"-"`
// DatabaseHost for connecting to the postgres database
DatabaseHost string `` /* 130-byte string literal not displayed */
// Queues to be enabled on the server, if not provided, a default queue is created
Queues []Queue `koanf:"queues" json:"queues" default:""`
// Workers to be enabled on the server
Workers Workers `koanf:"workers" json:"workers"`
// TrustCenterWorkers holds additional worker configurations based on build tags
TrustCenterWorkers trustcenter.Workers `koanf:"trustcenterworkers" json:"trustcenterworkers"`
// DefaultMaxRetries is the maximum number of retries for failed jobs, this can be set differently per job
DefaultMaxRetries int `koanf:"defaultmaxretries" json:"defaultmaxretries" default:"10"`
// Metrics enables or disables metrics collection
Metrics riverqueue.MetricsConfig `koanf:"metrics" json:"metrics"`
}
Config is the configuration for the river server
type Logger ¶
type Logger struct {
// Debug enables debug logging
Debug bool `koanf:"-" json:"-"`
// Pretty enables pretty logging
Pretty bool `koanf:"-" json:"-"`
}
Logger is the configuration for the logger used in the river server
type Queue ¶
type Queue struct {
// Name of the queue
Name string `koanf:"name" json:"name" default:"default"`
// MaxWorkers allotted for the queue
MaxWorkers int `koanf:"maxworkers" json:"maxworkers" default:"100"`
}
Queue is the configuration for a queue
type Workers ¶
type Workers struct {
// OpenlaneConfig configuration for openlane jobs, this is shared across multiple workers
// if a worker needs specific configuration, it can be set in the worker's config
OpenlaneConfig jobs.OpenlaneConfig `koanf:"openlaneconfig" json:"openlaneconfig"`
// EmailConfig configuration for email templates shared across multiple workers
EmailConfig jobs.EmailTemplateConfig `koanf:"emailconfig" json:"emailconfig"`
// EmailWorker configuration for sending emails
EmailWorker jobs.EmailWorker `koanf:"emailworker" json:"emailworker"`
// ExportContentWorker configuration for exporting content
ExportContentWorker jobs.ExportContentWorker `koanf:"exportcontentworker" json:"exportcontentworker"`
// DeleteExportContentWorker configuration for batch deleting exports and clogging object storage
DeleteExportContentWorker jobs.DeleteExportContentWorker `koanf:"deleteexportcontentworker" json:"deleteexportcontentworker"`
// SlackWorker configuration for sending Slack messages
SlackWorker jobs.SlackWorker `koanf:"slackworker" json:"slackworker"`
}
Workers that will be enabled on the server
Click to show internal directories.
Click to hide internal directories.