Documentation
¶
Index ¶
- Constants
- func Emit(root string, r Receipt) error
- func EmitDeliveryRoot(root *fsq.DeliveryRoot, r Receipt) error
- type ListFilter
- type Receipt
- func List(root, agent string, f ListFilter) ([]Receipt, error)
- func New(msgID, thread, sender, consumer, stage, detail string) Receipt
- func Read(path string) (Receipt, error)
- func ReadDeliveryRoot(root *fsq.DeliveryRoot, path string) (Receipt, error)
- func WaitFor(root, msgID, consumer, stage string, timeout, pollInterval time.Duration) (Receipt, error)
- func WaitForDeliveryRoot(root *fsq.DeliveryRoot, msgID, consumer, stage string, ...) (Receipt, error)
Constants ¶
View Source
const ( StageDrained = "drained" StageDLQ = "dlq" )
Variables ¶
This section is empty.
Functions ¶
func Emit ¶
Emit writes a receipt to the consumer's receipts directory. Receipts live only in the consumer namespace; callers that need to observe them must read from the delivery root where the consumer emitted them.
func EmitDeliveryRoot ¶ added in v0.45.0
func EmitDeliveryRoot(root *fsq.DeliveryRoot, r Receipt) error
EmitDeliveryRoot writes a receipt through an already authorized root.
Types ¶
type ListFilter ¶
type Receipt ¶
type Receipt struct {
Schema int `json:"schema"`
MsgID string `json:"msg_id"`
Thread string `json:"thread,omitempty"`
Sender string `json:"sender"`
Consumer string `json:"consumer"`
Stage string `json:"stage"`
EmittedAt string `json:"emitted_at"`
Detail string `json:"detail,omitempty"`
}
func ReadDeliveryRoot ¶ added in v0.49.0
func ReadDeliveryRoot(root *fsq.DeliveryRoot, path string) (Receipt, error)
ReadDeliveryRoot reads a receipt through an already authorized queue root.
func WaitFor ¶
func WaitFor(root, msgID, consumer, stage string, timeout, pollInterval time.Duration) (Receipt, error)
WaitFor polls for a specific consumer-local receipt by deterministic filename. Returns the receipt on match, or an error on timeout.
func WaitForDeliveryRoot ¶ added in v0.45.0
func WaitForDeliveryRoot(root *fsq.DeliveryRoot, msgID, consumer, stage string, timeout, pollInterval time.Duration) (Receipt, error)
WaitForDeliveryRoot polls through the same capability used for delivery so a renamed root cannot redirect receipt observation to another tree.
Click to show internal directories.
Click to hide internal directories.