Documentation
¶
Overview ¶
Package ingestionqueue owns durable admission and worker contracts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmpty = errors.New("no ingestion jobs available")
View Source
var ErrFull = errors.New("ingestion queue full; retry later")
View Source
var ErrLeaseLost = errors.New("ingestion lease lost")
Functions ¶
func Run ¶
Run uses bounded processing and renews leases without coupling ingestion to the queue implementation. A crash after commit is recovered by ingestion replay. Queue storage failures are logged and retried after a backoff instead of stopping the server; an unacknowledged lease expires and is claimed again.
Types ¶
type Queue ¶
type Queue interface {
Accept(context.Context, string, ingestion.Request) (Job, error)
Get(context.Context, string, string) (Job, error)
Claim(context.Context, time.Duration) (Delivery, error)
Renew(context.Context, Delivery, time.Duration) error
Complete(context.Context, Delivery, string) error
Retry(context.Context, Delivery, time.Time, string) error
Fail(context.Context, Delivery, string) error
}
Queue guarantees durable, idempotent acceptance and fenced job transitions. Completed jobs retain their identity even when the observation is deleted. An external broker adapter must atomically persist scheduling intent (outbox).
Click to show internal directories.
Click to hide internal directories.