Documentation
¶
Overview ¶
SPDX-License-Identifier: AGPL-3.0-or-later
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeliveryRepository ¶
type DeliveryRepository interface {
GetNextToProcess(ctx context.Context, limit int) ([]*database.WebhookDeliveryItem, error)
GetRetryable(ctx context.Context, limit int) ([]*database.WebhookDeliveryItem, error)
MarkDelivered(ctx context.Context, id int64, responseStatus int, responseHeaders map[string]string, responseBody string) error
MarkFailed(ctx context.Context, id int64, err error, shouldRetry bool) error
CleanupOld(ctx context.Context, olderThan time.Duration) (int64, error)
}
DeliveryRepository is the minimal interface used by the worker
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker sends webhook deliveries asynchronously
type WorkerConfig ¶
type WorkerConfig struct {
BatchSize int
PollInterval time.Duration
CleanupInterval time.Duration
CleanupAge time.Duration
MaxConcurrent int
RequestTimeout time.Duration
}
WorkerConfig controls batch, concurrency and timings
func DefaultWorkerConfig ¶
func DefaultWorkerConfig() WorkerConfig
Click to show internal directories.
Click to hide internal directories.