Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlackWebhookArgs ¶
type SlackWebhookArgs struct { WebhookUrl string `json:"webhook_url"` Incident api.Incident `json:"incident"` }
func (SlackWebhookArgs) InsertOpts ¶
func (SlackWebhookArgs) InsertOpts() river.InsertOpts
func (SlackWebhookArgs) Kind ¶
func (SlackWebhookArgs) Kind() string
type SlackWebhookWorker ¶
type SlackWebhookWorker struct { // An embedded WorkerDefaults sets up default methods to fulfill the rest of // the Worker interface: river.WorkerDefaults[SlackWebhookArgs] // contains filtered or unexported fields }
func NewSlackWebhookWorker ¶
func NewSlackWebhookWorker(logger *zap.Logger, httpClient *http.Client) *SlackWebhookWorker
func (*SlackWebhookWorker) NextRetry ¶
func (w *SlackWebhookWorker) NextRetry(job *river.Job[SlackWebhookArgs]) time.Time
NextRetry performs exponential backoff with a maximum of 120 seconds.
func (*SlackWebhookWorker) Timeout ¶
func (w *SlackWebhookWorker) Timeout(job *river.Job[SlackWebhookArgs]) time.Duration
func (*SlackWebhookWorker) Work ¶
func (w *SlackWebhookWorker) Work(ctx context.Context, job *river.Job[SlackWebhookArgs]) error
Click to show internal directories.
Click to hide internal directories.