task

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MPL-2.0 Imports: 27 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeliveryAttemptFailed = errors.New("error sending event")
View Source
var ErrRateLimit = errors.New("rate limit error")

Functions

func ExportCollection added in v0.6.0

func ExportCollection(ctx context.Context, collection string, uri string, exportDir string, expDate time.Time, objectStoreClient objectstore.ObjectStore, group *datastore.Group, eventRepo datastore.EventRepository, eventDeliveriesRepo datastore.EventDeliveryRepository, groupRepo datastore.GroupRepository, searcher searcher.Searcher) error

func GetArgsByCollection added in v0.6.0

func GetArgsByCollection(collection string, uri string, exportDir string, expDate time.Time, group *datastore.Group) ([]string, string, error)

func GetRetryDelay added in v0.6.0

func GetRetryDelay(n int, err error, t *asynq.Task) time.Duration

func MonitorTwitterSources added in v0.6.0

func MonitorTwitterSources(sourceRepo datastore.SourceRepository, subRepo datastore.SubscriptionRepository, appRepo datastore.ApplicationRepository, queue queue.Queuer) func(context.Context, *asynq.Task) error

func NewObjectStoreClient added in v0.6.0

func NewObjectStoreClient(config *datastore.Configuration) (objectstore.ObjectStore, string, error)

func ProcessDeadLetters

func ProcessDeadLetters(job *queue.Job)

func ProcessEventCreated added in v0.5.3

func ProcessEventCreated(appRepo datastore.ApplicationRepository, eventRepo datastore.EventRepository, groupRepo datastore.GroupRepository, eventDeliveryRepo datastore.EventDeliveryRepository, cache cache.Cache, eventQueue queue.Queuer, subRepo datastore.SubscriptionRepository) func(context.Context, *asynq.Task) error

func RententionPolicies added in v0.6.0

func RententionPolicies(instanceConfig config.Configuration, configRepo datastore.ConfigurationRepository, groupRepo datastore.GroupRepository, eventRepo datastore.EventRepository, eventDeliveriesRepo datastore.EventDeliveryRepository, searcher searcher.Searcher) func(context.Context, *asynq.Task) error

func RetryEventDeliveries added in v0.6.0

func RetryEventDeliveries(statuses []datastore.EventDeliveryStatus, lookBackDuration string, eventDeliveryRepo datastore.EventDeliveryRepository, groupRepo datastore.GroupRepository, eventQueue queue.Queuer)

func SendNotification added in v0.6.0

func SendNotification(notificationSender notification.Sender) func(ctx context.Context, t *asynq.Task) error

Types

type EndpointError

type EndpointError struct {
	Err error
	// contains filtered or unexported fields
}

func (*EndpointError) Delay

func (e *EndpointError) Delay() time.Duration

func (*EndpointError) Error

func (e *EndpointError) Error() string

type RateLimitError added in v0.6.0

type RateLimitError struct {
	Err error
	// contains filtered or unexported fields
}

func (*RateLimitError) Delay added in v0.6.0

func (e *RateLimitError) Delay() time.Duration

func (*RateLimitError) Error added in v0.6.0

func (e *RateLimitError) Error() string

func (*RateLimitError) RateLimit added in v0.6.0

func (e *RateLimitError) RateLimit()

type SignatureValues added in v0.5.3

type SignatureValues struct {
	HMAC      string
	Timestamp string
}

Jump to

Keyboard shortcuts

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