twitter_post

package
v0.119.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TwitterPostArgs

type TwitterPostArgs struct {
	Incident   api.Incident `json:"incident"`
	WebhookUrl string       `json:"webhook_url"`
}

func (TwitterPostArgs) InsertOpts

func (TwitterPostArgs) InsertOpts() river.InsertOpts

func (TwitterPostArgs) Kind

func (TwitterPostArgs) Kind() string

type TwitterPostWorker

type TwitterPostWorker struct {
	// An embedded WorkerDefaults sets up default methods to fulfill the rest of
	// the Worker interface:
	river.WorkerDefaults[TwitterPostArgs]
	// contains filtered or unexported fields
}

func NewTwitterPostWorker

func NewTwitterPostWorker(logger *zap.Logger, httpClient *http.Client, dbClient *db.DbClient) *TwitterPostWorker

func (*TwitterPostWorker) NextRetry

func (w *TwitterPostWorker) NextRetry(job *river.Job[TwitterPostArgs]) time.Time

NextRetry performs exponential backoff with a maximum of 120 seconds.

func (*TwitterPostWorker) Timeout

func (*TwitterPostWorker) Work

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL