Documentation
ΒΆ
Index ΒΆ
- Constants
- Variables
- func AggregateChainStats(jobs []Job) map[string]int64
- func ExtractOTelTraceContext(ctx context.Context, job Job) context.Context
- func ExtractTraceID(ctx context.Context) string
- func InjectOTelTraceContext(ctx context.Context, req *EnqueueRequest)
- func IsNonRetryable(err error) bool
- func IsRetryable(err error) bool
- func LogJobAttrs(job Job) []any
- func NonRetryable(err error) error
- func ParallelClaimDemo()
- func RegisterTyped[T any](e *Engine, jobType string, ...)
- func RegisterTypedWithValidator[T any](e *Engine, jobType string, ...)
- func Retryable(err error) error
- func WithTraceID(ctx context.Context, traceID string) context.Context
- type ChainFilter
- type ChainSummary
- type Engine
- func (e *Engine) BulkPurgeDLQ(ctx context.Context, filter JobFilter) (int64, error)
- func (e *Engine) BulkReplayDLQ(ctx context.Context, filter JobFilter) (int64, error)
- func (e *Engine) BulkSkipDLQ(ctx context.Context, filter JobFilter) (int64, error)
- func (e *Engine) Enqueue(ctx context.Context, req EnqueueRequest) (Job, error)
- func (e *Engine) EnqueueBatch(ctx context.Context, reqs []EnqueueRequest) ([]Job, error)
- func (e *Engine) EnqueueDelayed(ctx context.Context, req EnqueueRequest, delay time.Duration) (Job, error)
- func (e *Engine) Get(ctx context.Context, id uuid.UUID) (Job, error)
- func (e *Engine) JobTypes() []string
- func (e *Engine) NotifyChain(chainID string)
- func (e *Engine) Register(jobType string, h Handler)
- func (e *Engine) RegisterFunc(jobType string, fn func(ctx context.Context, job Job) error)
- func (e *Engine) ReplayJob(ctx context.Context, id uuid.UUID) error
- func (e *Engine) RescheduleJob(ctx context.Context, id uuid.UUID, newAvailableAt time.Time) (Job, error)
- func (e *Engine) Schedule(ctx context.Context, req EnqueueRequest, runAt time.Time) (Job, error)
- func (e *Engine) Shutdown(ctx context.Context) error
- func (e *Engine) SkipJob(ctx context.Context, id uuid.UUID) error
- func (e *Engine) Start(ctx context.Context) error
- type EnqueueRequest
- type EventListener
- type FunctionalEventListener
- type Handler
- type HandlerFunc
- type Job
- type JobFilter
- type Logger
- type Metrics
- type NonRetryableError
- type NoopEventListener
- type NoopLogger
- type NoopMetrics
- func (NoopMetrics) IncBlockedChain()
- func (NoopMetrics) IncClaimConflicts()
- func (NoopMetrics) IncClaimed()
- func (NoopMetrics) IncCompleted(string)
- func (NoopMetrics) IncFailed(string)
- func (NoopMetrics) IncPanics(string)
- func (NoopMetrics) IncRetry(string)
- func (NoopMetrics) IncStaleRecovered(int)
- func (NoopMetrics) ObserveExecDuration(string, time.Duration)
- func (NoopMetrics) ObserveQueueDelay(string, time.Duration)
- func (NoopMetrics) SetActiveLeases(int)
- type OTelMetrics
- func (m *OTelMetrics) IncBlockedChain()
- func (m *OTelMetrics) IncClaimConflicts()
- func (m *OTelMetrics) IncClaimed()
- func (m *OTelMetrics) IncCompleted(jobType string)
- func (m *OTelMetrics) IncFailed(jobType string)
- func (m *OTelMetrics) IncPanics(jobType string)
- func (m *OTelMetrics) IncRetry(jobType string)
- func (m *OTelMetrics) IncStaleRecovered(n int)
- func (m *OTelMetrics) ObserveExecDuration(jobType string, d time.Duration)
- func (m *OTelMetrics) ObserveQueueDelay(jobType string, d time.Duration)
- func (m *OTelMetrics) SetActiveLeases(n int)
- type Option
- func WithConcurrency(n int) Option
- func WithDLQThreshold(n int64) Option
- func WithEventListener(l EventListener) Option
- func WithLease(d time.Duration) Option
- func WithLogger(l Logger) Option
- func WithMetrics(m Metrics) Option
- func WithNotify(enabled bool) Option
- func WithOrderingMode(mode string) Option
- func WithOrderingStrategy(s OrderingStrategyResolver) Option
- func WithPanicHandler(h PanicHandler) Option
- func WithPollInterval(d time.Duration) Option
- func WithRecoveryInterval(d time.Duration) Option
- func WithRetryOnPanic(retry bool) Option
- func WithRetryPolicy(p retry.Policy) Option
- func WithSlogLogger(l *slog.Logger) Option
- func WithTracer(t trace.Tracer) Option
- func WithTracerProvider(tp trace.TracerProvider) Option
- func WithWebhook(cfg WebhookConfig) Option
- func WithWorkerID(id string) Option
- type OrderingStrategyResolver
- type PanicError
- type PanicHandler
- type PayloadValidatorFunc
- type Registry
- type Repository
- type RetryableError
- type SlogLogger
- type Stats
- type Validator
- type ValidatorCtx
- type WebhookConfig
- type WebhookDispatcher
- type WebhookPayload
Constants ΒΆ
const ( OrderingModeStrict = "strict" OrderingModeSkipOnFailure = "skip-on-failure" OrderingModeDeadLetterAndContinue = "dead-letter-and-continue" )
Ordering Mode Constants (Policy-Driven Execution Modes)
Variables ΒΆ
var ( ErrNotFound = errors.New("orderedjob: job not found") ErrAlreadyExists = errors.New("orderedjob: job already exists") ErrInvalidTransition = errors.New("orderedjob: invalid state transition") ErrLeaseConflict = errors.New("orderedjob: lease conflict / fencing violation") ErrChainBlocked = errors.New("orderedjob: chain blocked") ErrSequenceGap = errors.New("orderedjob: sequence gap") ErrHandlerNotFound = errors.New("orderedjob: handler not found") ErrNotClaimable = errors.New("orderedjob: job not claimable") ErrDuplicateChainSeq = errors.New("orderedjob: duplicate chain_id, sequence") ErrJobNotEligible = errors.New("orderedjob: job not eligible for rescheduling") ErrValidationFailed = errors.New("orderedjob: payload validation failed") )
Functions ΒΆ
func AggregateChainStats ΒΆ
ProcessJobsParallel is an example of using rill for parallel post-processing (metrics aggregation).
func ExtractOTelTraceContext ΒΆ added in v1.8.0
ExtractOTelTraceContext extracts TraceID from job into context.
func ExtractTraceID ΒΆ
ExtractTraceID extracts trace ID from context.
func InjectOTelTraceContext ΒΆ added in v1.8.0
func InjectOTelTraceContext(ctx context.Context, req *EnqueueRequest)
InjectOTelTraceContext extracts W3C traceparent (or OTel SpanContext) from ctx and sets req.TraceID if req.TraceID is empty.
func IsNonRetryable ΒΆ
func IsRetryable ΒΆ
func LogJobAttrs ΒΆ
func NonRetryable ΒΆ
func ParallelClaimDemo ΒΆ
func ParallelClaimDemo()
ParallelClaimDemo shows how rill can be used for fan-out execution if you ever need to process claimed jobs via pipeline.
func RegisterTyped ΒΆ
func RegisterTyped[T any](e *Engine, jobType string, fn func(ctx context.Context, job Job, payload T) error)
RegisterTyped registers a type-safe handler function that automatically unmarshals JSON payloads. If payload type T implements Validator or ValidatorCtx interface, validation is executed automatically before calling fn.
func RegisterTypedWithValidator ΒΆ added in v1.7.0
func RegisterTypedWithValidator[T any]( e *Engine, jobType string, fn func(ctx context.Context, job Job, payload T) error, validator PayloadValidatorFunc[T], )
RegisterTypedWithValidator registers a type-safe handler function with optional custom payload validation logic. Validation occurs after JSON unmarshaling and self-validation. If validation returns an error, execution fails immediately with a NonRetryable error wrapping ErrValidationFailed.
Types ΒΆ
type ChainFilter ΒΆ added in v1.4.0
type ChainSummary ΒΆ added in v1.2.0
type Engine ΒΆ
type Engine struct {
// contains filtered or unexported fields
}
Engine is the core orchestrator.
func New ΒΆ
func New(repo Repository, opts ...Option) *Engine
func (*Engine) BulkPurgeDLQ ΒΆ added in v1.9.0
func (*Engine) BulkReplayDLQ ΒΆ added in v1.9.0
func (*Engine) BulkSkipDLQ ΒΆ added in v1.9.0
func (*Engine) EnqueueBatch ΒΆ
func (*Engine) EnqueueDelayed ΒΆ added in v1.7.0
func (e *Engine) EnqueueDelayed(ctx context.Context, req EnqueueRequest, delay time.Duration) (Job, error)
EnqueueDelayed enqueues a job scheduled for execution after delay.
func (*Engine) JobTypes ΒΆ added in v1.5.0
JobTypes returns all registered job type names in sorted order.
func (*Engine) NotifyChain ΒΆ
func (*Engine) RegisterFunc ΒΆ
func (*Engine) RescheduleJob ΒΆ added in v1.7.0
func (e *Engine) RescheduleJob(ctx context.Context, id uuid.UUID, newAvailableAt time.Time) (Job, error)
RescheduleJob modifies the scheduled available_at timestamp of a job.
type EnqueueRequest ΒΆ
type EnqueueRequest struct {
ChainID string `json:"chain_id"`
Sequence int64 `json:"sequence"`
Type string `json:"job_type"`
Payload any `json:"payload"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
TraceID string `json:"trace_id,omitempty"`
OrderingMode string `json:"ordering_mode,omitempty"`
MaxAttempts int `json:"max_attempts,omitempty"`
DeadlineAt *time.Time `json:"deadline_at,omitempty"`
AvailableAt *time.Time `json:"available_at,omitempty"`
}
EnqueueRequest is used by callers.
type EventListener ΒΆ added in v1.9.0
type EventListener interface {
OnJobFailed(ctx context.Context, job Job, err error)
OnChainBlocked(ctx context.Context, chainID string, job Job)
OnDLQThresholdExceeded(ctx context.Context, dlqCount int64)
}
EventListener defines callbacks for key queue lifecycle events.
type FunctionalEventListener ΒΆ added in v1.9.0
type FunctionalEventListener struct {
OnJobFailedFunc func(ctx context.Context, job Job, err error)
OnChainBlockedFunc func(ctx context.Context, chainID string, job Job)
OnDLQThresholdExceededFunc func(ctx context.Context, dlqCount int64)
}
FunctionalEventListener allows registering individual functions as EventListener.
func (*FunctionalEventListener) OnChainBlocked ΒΆ added in v1.9.0
func (f *FunctionalEventListener) OnChainBlocked(ctx context.Context, chainID string, job Job)
func (*FunctionalEventListener) OnDLQThresholdExceeded ΒΆ added in v1.9.0
func (f *FunctionalEventListener) OnDLQThresholdExceeded(ctx context.Context, dlqCount int64)
func (*FunctionalEventListener) OnJobFailed ΒΆ added in v1.9.0
func (f *FunctionalEventListener) OnJobFailed(ctx context.Context, job Job, err error)
type HandlerFunc ΒΆ
type Job ΒΆ
type Job struct {
ID uuid.UUID `json:"id"`
ChainID string `json:"chain_id"`
Sequence int64 `json:"sequence"`
Type string `json:"type"`
Payload json.RawMessage `json:"payload"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
TenantID string `json:"tenant_id,omitempty"`
OrderingMode string `json:"ordering_mode,omitempty"`
// runtime fields
Status string `json:"status"`
Attempt int `json:"attempt"`
MaxAttempts int `json:"max_attempts"`
AvailableAt time.Time `json:"available_at"`
DeadlineAt *time.Time `json:"deadline_at,omitempty"`
WorkerID string `json:"worker_id,omitempty"`
LeaseUntil *time.Time `json:"lease_until,omitempty"`
LeaseGeneration int `json:"lease_generation"`
LastError string `json:"last_error,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
FailedAt *time.Time `json:"failed_at,omitempty"`
TraceID string `json:"trace_id,omitempty"`
}
Job represents a unit of work bound to a chain.
func BatchEnqueueParallel ΒΆ
BatchEnqueueParallel demonstrates rill usage for high-throughput enqueue validation / transformation. It validates payloads in parallel, then enqueues atomically via repository.
func (Job) IsTerminal ΒΆ
type Logger ΒΆ
type Logger interface {
Info(ctx context.Context, msg string, args ...any)
Error(ctx context.Context, msg string, args ...any)
Debug(ctx context.Context, msg string, args ...any)
}
Logger structured minimal per section 26.
type Metrics ΒΆ
type Metrics interface {
IncClaimed()
IncCompleted(jobType string)
IncFailed(jobType string)
IncRetry(jobType string)
ObserveExecDuration(jobType string, d time.Duration)
ObserveQueueDelay(jobType string, d time.Duration)
SetActiveLeases(n int)
IncClaimConflicts()
IncStaleRecovered(n int)
IncBlockedChain()
IncPanics(jobType string)
}
Metrics interface per proposal section 25.
type NonRetryableError ΒΆ
type NonRetryableError struct{ Err error }
NonRetryableError marks a permanent failure.
func (NonRetryableError) Error ΒΆ
func (e NonRetryableError) Error() string
func (NonRetryableError) Unwrap ΒΆ
func (e NonRetryableError) Unwrap() error
type NoopEventListener ΒΆ added in v1.9.0
type NoopEventListener struct{}
func (NoopEventListener) OnChainBlocked ΒΆ added in v1.9.0
func (NoopEventListener) OnChainBlocked(context.Context, string, Job)
func (NoopEventListener) OnDLQThresholdExceeded ΒΆ added in v1.9.0
func (NoopEventListener) OnDLQThresholdExceeded(context.Context, int64)
func (NoopEventListener) OnJobFailed ΒΆ added in v1.9.0
func (NoopEventListener) OnJobFailed(context.Context, Job, error)
type NoopLogger ΒΆ
type NoopLogger struct{}
type NoopMetrics ΒΆ
type NoopMetrics struct{}
func (NoopMetrics) IncBlockedChain ΒΆ
func (NoopMetrics) IncBlockedChain()
func (NoopMetrics) IncClaimConflicts ΒΆ
func (NoopMetrics) IncClaimConflicts()
func (NoopMetrics) IncClaimed ΒΆ
func (NoopMetrics) IncClaimed()
func (NoopMetrics) IncCompleted ΒΆ
func (NoopMetrics) IncCompleted(string)
func (NoopMetrics) IncFailed ΒΆ
func (NoopMetrics) IncFailed(string)
func (NoopMetrics) IncPanics ΒΆ added in v1.7.0
func (NoopMetrics) IncPanics(string)
func (NoopMetrics) IncRetry ΒΆ
func (NoopMetrics) IncRetry(string)
func (NoopMetrics) IncStaleRecovered ΒΆ
func (NoopMetrics) IncStaleRecovered(int)
func (NoopMetrics) ObserveExecDuration ΒΆ
func (NoopMetrics) ObserveExecDuration(string, time.Duration)
func (NoopMetrics) ObserveQueueDelay ΒΆ
func (NoopMetrics) ObserveQueueDelay(string, time.Duration)
func (NoopMetrics) SetActiveLeases ΒΆ
func (NoopMetrics) SetActiveLeases(int)
type OTelMetrics ΒΆ added in v1.8.0
type OTelMetrics struct {
// contains filtered or unexported fields
}
OTelMetrics implements Metrics backed by OpenTelemetry Metrics API.
func NewOTelMetrics ΒΆ added in v1.8.0
func NewOTelMetrics(mp metric.MeterProvider) (*OTelMetrics, error)
NewOTelMetrics creates a Metrics exporter backed by an OpenTelemetry Meter. If mp is nil, otel.GetMeterProvider() is used.
func (*OTelMetrics) IncBlockedChain ΒΆ added in v1.8.0
func (m *OTelMetrics) IncBlockedChain()
func (*OTelMetrics) IncClaimConflicts ΒΆ added in v1.8.0
func (m *OTelMetrics) IncClaimConflicts()
func (*OTelMetrics) IncClaimed ΒΆ added in v1.8.0
func (m *OTelMetrics) IncClaimed()
func (*OTelMetrics) IncCompleted ΒΆ added in v1.8.0
func (m *OTelMetrics) IncCompleted(jobType string)
func (*OTelMetrics) IncFailed ΒΆ added in v1.8.0
func (m *OTelMetrics) IncFailed(jobType string)
func (*OTelMetrics) IncPanics ΒΆ added in v1.8.0
func (m *OTelMetrics) IncPanics(jobType string)
func (*OTelMetrics) IncRetry ΒΆ added in v1.8.0
func (m *OTelMetrics) IncRetry(jobType string)
func (*OTelMetrics) IncStaleRecovered ΒΆ added in v1.8.0
func (m *OTelMetrics) IncStaleRecovered(n int)
func (*OTelMetrics) ObserveExecDuration ΒΆ added in v1.8.0
func (m *OTelMetrics) ObserveExecDuration(jobType string, d time.Duration)
func (*OTelMetrics) ObserveQueueDelay ΒΆ added in v1.8.0
func (m *OTelMetrics) ObserveQueueDelay(jobType string, d time.Duration)
func (*OTelMetrics) SetActiveLeases ΒΆ added in v1.8.0
func (m *OTelMetrics) SetActiveLeases(n int)
type Option ΒΆ
type Option func(*Engine)
func WithConcurrency ΒΆ
func WithDLQThreshold ΒΆ added in v1.9.0
func WithEventListener ΒΆ added in v1.9.0
func WithEventListener(l EventListener) Option
func WithLogger ΒΆ
func WithMetrics ΒΆ
func WithNotify ΒΆ
func WithOrderingMode ΒΆ
func WithOrderingStrategy ΒΆ added in v1.6.0
func WithOrderingStrategy(s OrderingStrategyResolver) Option
func WithPanicHandler ΒΆ added in v1.7.0
func WithPanicHandler(h PanicHandler) Option
func WithPollInterval ΒΆ
func WithRecoveryInterval ΒΆ
func WithRetryOnPanic ΒΆ added in v1.7.0
func WithRetryPolicy ΒΆ
func WithSlogLogger ΒΆ
func WithTracer ΒΆ added in v1.8.0
func WithTracerProvider ΒΆ added in v1.8.0
func WithTracerProvider(tp trace.TracerProvider) Option
func WithWebhook ΒΆ added in v1.9.0
func WithWebhook(cfg WebhookConfig) Option
func WithWorkerID ΒΆ
type OrderingStrategyResolver ΒΆ added in v1.6.0
type OrderingStrategyResolver func(req EnqueueRequest) string
OrderingStrategyResolver resolves ordering mode per job request dynamically.
type PanicError ΒΆ added in v1.7.0
PanicError encapsulates a panic value and stack trace captured during job execution.
func (*PanicError) Error ΒΆ added in v1.7.0
func (p *PanicError) Error() string
type PanicHandler ΒΆ added in v1.7.0
PanicHandler handles panics caught during job execution.
type PayloadValidatorFunc ΒΆ added in v1.7.0
PayloadValidatorFunc is a custom validation function type for a payload of type T.
type Registry ΒΆ
type Registry struct {
// contains filtered or unexported fields
}
Registry holds job_type -> handler
func NewRegistry ΒΆ
func NewRegistry() *Registry
type Repository ΒΆ
type Repository interface {
// Enqueue inserts a job. If req.Sequence == 0 it auto-assigns.
Enqueue(ctx context.Context, req EnqueueRequest) (Job, error)
// EnqueueBatch atomic if required.
EnqueueBatch(ctx context.Context, reqs []EnqueueRequest) ([]Job, error)
Get(ctx context.Context, id uuid.UUID) (Job, error)
// GetByChainSeq fetches by chain+seq
GetByChainSeq(ctx context.Context, chainID string, seq int64) (Job, error)
// Claim finds and atomically marks a job as PROCESSING (C3, C4, C10).
// Returns ErrNotFound if none eligible.
Claim(ctx context.Context, workerID string, lease time.Duration) (Job, error)
// Complete marks COMPLETED with fencing check (C10, C5).
Complete(ctx context.Context, id uuid.UUID, workerID string, leaseGen int) error
// Fail marks FAILED / DEAD_LETTERED
Fail(ctx context.Context, id uuid.UUID, workerID string, leaseGen int, errMsg string, terminal bool) error
// Retry marks RETRYING with next available_at (C6)
Retry(ctx context.Context, id uuid.UUID, workerID string, leaseGen int, errMsg string, nextAvailable time.Time) error
// Heartbeat extends lease
Heartbeat(ctx context.Context, id uuid.UUID, workerID string, leaseGen int, lease time.Duration) error
// Cancel
RequestCancel(ctx context.Context, id uuid.UUID) error
ConfirmCancel(ctx context.Context, id uuid.UUID, workerID string, leaseGen int) error
// Recovery & DLQ Operations
RecoverStale(ctx context.Context, limit int, retryPolicy func(attempt int) time.Duration) (int, error)
ReplayJob(ctx context.Context, id uuid.UUID) error
ReplayJobWithPayload(ctx context.Context, id uuid.UUID, newPayload json.RawMessage) error
SkipJob(ctx context.Context, id uuid.UUID) error
RescheduleJob(ctx context.Context, id uuid.UUID, availableAt time.Time) (Job, error)
BulkReplayDLQ(ctx context.Context, filter JobFilter) (int64, error)
BulkSkipDLQ(ctx context.Context, filter JobFilter) (int64, error)
BulkPurgeDLQ(ctx context.Context, filter JobFilter) (int64, error)
CountDLQ(ctx context.Context) (int64, error)
// Make next eligible after completion (C5)
PromoteNext(ctx context.Context, chainID string, completedSeq int64) error
// List etc
ListPendingChains(ctx context.Context) ([]string, error)
// Inspection & Dashboard Methods
GetStats(ctx context.Context) (Stats, error)
ListJobs(ctx context.Context, filter JobFilter) ([]Job, int64, error)
ListChains(ctx context.Context, filter ChainFilter) ([]ChainSummary, int64, error)
// Real-time LISTEN/NOTIFY interface
NotifyChannel() string
Listen(ctx context.Context, callback func(chainID string)) error
}
Repository is the persistence port. All coordination decisions use DB time where consistency matters (C16).
type RetryableError ΒΆ
type RetryableError struct{ Err error }
RetryableError marks a transient failure that should be retried.
func (RetryableError) Error ΒΆ
func (e RetryableError) Error() string
func (RetryableError) Unwrap ΒΆ
func (e RetryableError) Unwrap() error
type SlogLogger ΒΆ
func NewSlogLogger ΒΆ
func NewSlogLogger(l *slog.Logger) *SlogLogger
func (*SlogLogger) Debug ΒΆ
func (s *SlogLogger) Debug(ctx context.Context, msg string, args ...any)
type Stats ΒΆ added in v1.2.0
type Stats struct {
Pending int64 `json:"pending"`
Blocked int64 `json:"blocked"`
Processing int64 `json:"processing"`
Completed int64 `json:"completed"`
Retrying int64 `json:"retrying"`
Failed int64 `json:"failed"`
DeadLettered int64 `json:"dead_lettered"`
CancelRequested int64 `json:"cancel_requested"`
Cancelled int64 `json:"cancelled"`
Scheduled int64 `json:"scheduled"`
Total int64 `json:"total"`
ActiveChains int64 `json:"active_chains"`
}
type Validator ΒΆ added in v1.7.0
type Validator interface {
Validate() error
}
Validator is an interface that payload structs can implement to perform self-validation.
type ValidatorCtx ΒΆ added in v1.7.0
ValidatorCtx is an interface that payload structs can implement to perform self-validation with context.
type WebhookConfig ΒΆ added in v1.9.0
type WebhookDispatcher ΒΆ added in v1.9.0
type WebhookDispatcher struct {
// contains filtered or unexported fields
}
func NewWebhookDispatcher ΒΆ added in v1.9.0
func NewWebhookDispatcher(cfg WebhookConfig) *WebhookDispatcher
func (*WebhookDispatcher) OnChainBlocked ΒΆ added in v1.9.0
func (w *WebhookDispatcher) OnChainBlocked(ctx context.Context, chainID string, job Job)
func (*WebhookDispatcher) OnDLQThresholdExceeded ΒΆ added in v1.9.0
func (w *WebhookDispatcher) OnDLQThresholdExceeded(ctx context.Context, dlqCount int64)
func (*WebhookDispatcher) OnJobFailed ΒΆ added in v1.9.0
func (w *WebhookDispatcher) OnJobFailed(ctx context.Context, job Job, err error)
type WebhookPayload ΒΆ added in v1.9.0
type WebhookPayload struct {
Event string `json:"event"`
Timestamp time.Time `json:"timestamp"`
ChainID string `json:"chain_id,omitempty"`
JobID string `json:"job_id,omitempty"`
JobType string `json:"job_type,omitempty"`
Error string `json:"error,omitempty"`
DLQCount int64 `json:"dlq_count,omitempty"`
}