Versions in this module Expand all Collapse all v0 v0.2.2 Nov 13, 2026 v0.2.1 Oct 22, 2026 v0.2.0 Oct 22, 2026 v0.1.1 Oct 20, 2026 v0.1.0 Oct 20, 2026 Changes in this version + const DefaultAttempts + const DefaultHost + const Version + var ErrAccountBlocked = &KindError + var ErrAccountSuspended = &KindError + var ErrDedupClaimed = &KindError + var ErrDedupDisabled = &KindError + var ErrDedupInFlight = &KindError + var ErrInvalidRequest = errors.New("invalid request") + var ErrInvalidToken = &KindError + var ErrNotFailed = &KindError + var ErrOperationUnconfirmed = &KindError + var ErrPayloadTooLarge = &KindError + var ErrQueueBusy = &KindError + var ErrQueueCreating = &KindError + var ErrQueueDeleting = &KindError + var ErrQueueExists = &KindError + var ErrQueueLimit = &KindError + var ErrQueueNotFound = &KindError + var ErrQueueReplaced = &KindError + var ErrRateLimited = &KindError + var ErrResultUnknown = errors.New("result unknown") + var ErrRetentionLimit = &KindError + var ErrSpoolFull = &KindError + var ErrSpoolNotFound = &KindError + var ErrStaleToken = &KindError + var ErrUnauthenticated = &KindError + var ErrUnavailable = errors.New("unavailable") + var ErrUnknownHeader = &KindError + func Messages(ctx context.Context, c *Client, req MessagesRequest) iter.Seq2[Message, error] + func Queues(ctx context.Context, c *Client, req QueuesRequest) iter.Seq2[Queue, error] + type AckAndSendRequest struct + Data []byte + DataSource DataSource + Dedup Dedup + DelaySeconds int + Lease Lease + Queue string + RetryUnknown bool + ReturnHandle bool + Spool string + type AckAndSendResult struct + Handle Handle + ID string + type AckRequest struct + Lease Lease + Spool string + type Client struct + APIKey string + Attempts int + DebugWriter io.Writer + Host string + InsecureDisableTLS bool + Trace ClientTrace + func (c *Client) Ack(ctx context.Context, req AckRequest) error + func (c *Client) AckAndSend(ctx context.Context, req AckAndSendRequest) (AckAndSendResult, error) + func (c *Client) Clone() *Client + func (c *Client) CreateQueue(ctx context.Context, req CreateQueueRequest) (Queue, error) + func (c *Client) DeleteQueue(ctx context.Context, req DeleteQueueRequest) error + func (c *Client) Discard(ctx context.Context, req DiscardRequest) error + func (c *Client) Fail(ctx context.Context, req FailRequest) error + func (c *Client) Inspect(ctx context.Context, req InspectRequest) (InspectResult, error) + func (c *Client) Messages(ctx context.Context, req MessagesRequest) (Page[Message], error) + func (c *Client) Nack(ctx context.Context, req NackRequest) error + func (c *Client) Queue(ctx context.Context, req QueueRequest) (Queue, error) + func (c *Client) Queues(ctx context.Context, req QueuesRequest) (Page[Queue], error) + func (c *Client) Recover(ctx context.Context, req RecoverRequest) error + func (c *Client) Recv(ctx context.Context, req RecvRequest) (ret RecvResult, ok bool, err error) + func (c *Client) Release(ctx context.Context, req ReleaseRequest) error + func (c *Client) Renew(ctx context.Context, req RenewRequest) (RenewResult, error) + func (c *Client) Send(ctx context.Context, req SendRequest) (SendResult, error) + func (c *Client) Spool(ctx context.Context, req SpoolRequest) (Spool, error) + func (c *Client) UpdateQueue(ctx context.Context, req UpdateQueueRequest) error + type ClientTrace struct + OnConnect func(network, addr string) func(error) + OnMalformedResponse func(context.Context, RequestTrace, error) + OnRequest func(context.Context, RequestTrace) func(error) + func LoggerClientTrace(logger *slog.Logger) ClientTrace + func (t ClientTrace) Compose(x ClientTrace) (ret ClientTrace) + type CreateQueueRequest struct + Queue string + Settings QueueSettingsCreate + Spool string + type DataSource struct + func DataSourceReadSeeker(rs io.ReadSeeker) DataSource + func DataSourceReader(r io.Reader) DataSource + func (d DataSource) IsZero() bool + type Dedup struct + func DedupHash(h string) Dedup + func DedupString(str string) Dedup + type DedupClaimedError struct + ID string + func (e *DedupClaimedError) Error() string + type DeleteQueueRequest struct + Mode QueueDeleteMode + Queue string + QueueUID *string + Spool string + type DiscardRequest struct + Handle Handle + Lease Lease + Spool string + type Error struct + Details error + Kind ErrorKind + Message string + func (e *Error) Error() string + func (e *Error) Is(x error) bool + func (e *Error) Unwrap() error + type ErrorKind uint + const ErrorKindAccountBlocked + const ErrorKindAccountSuspended + const ErrorKindDedupClaimed + const ErrorKindDedupDisabled + const ErrorKindDedupInFlight + const ErrorKindInvalidToken + const ErrorKindNotFailed + const ErrorKindOperationUnconfirmed + const ErrorKindPayloadTooLarge + const ErrorKindQueueBusy + const ErrorKindQueueCreating + const ErrorKindQueueDeleting + const ErrorKindQueueExists + const ErrorKindQueueLimit + const ErrorKindQueueNotFound + const ErrorKindQueueReplaced + const ErrorKindRateLimited + const ErrorKindRetentionLimit + const ErrorKindSpoolFull + const ErrorKindSpoolNotFound + const ErrorKindStaleToken + const ErrorKindUnauthenticated + const ErrorKindUnknown + const ErrorKindUnknownHeader + func (k ErrorKind) String() string + type FailRequest struct + Lease Lease + Spool string + type Handle string + func (Handle) String() string + type InspectRequest struct + Handle Handle + Spool string + Stream bool + type InspectResult struct + CreatedAt time.Time + Data []byte + DataSize int64 + DataStream io.ReadCloser + ExpiresAt time.Time + ID string + LeaseExpiresAt time.Time + Retries int + State MessageState + VisibleAt time.Time + type KindError struct + Kind ErrorKind + func (e *KindError) Error() string + type Lease string + func (Lease) String() string + type Message struct + CreatedAt time.Time + ExpiresAt time.Time + Handle Handle + ID string + LeaseExpiresAt time.Time + Retries int + State MessageState + VisibleAt time.Time + type MessageState uint + const MessageStateDelayed + const MessageStateFailed + const MessageStatePending + const MessageStateUnavailable + const MessageStateUnknown + const MessageStateVisible + func ParseMessageState(s string) (MessageState, error) + func (s MessageState) String() string + type MessageStats struct + AckedTotal int64 + AddedTotal int64 + DataBytes int64 + Delayed int64 + DiscardedTotal int64 + ExpiredTotal int64 + Failed int64 + FailedTotal int64 + NackedTotal int64 + Pending int64 + ReleasedTotal int64 + SampledAt time.Time + StartedAt time.Time + Total int64 + Unavailable int64 + Visible int64 + type MessagesRequest struct + After string + Limit int + Queue string + ReturnHandle bool + Spool string + State MessageState + type NackRequest struct + Lease Lease + Spool string + type Op uint + const OpAck + const OpAckAndSend + const OpCreateQueue + const OpDeleteQueue + const OpDiscard + const OpFail + const OpInspect + const OpMessages + const OpNack + const OpQueue + const OpQueues + const OpRecover + const OpRecv + const OpRelease + const OpRenew + const OpSend + const OpSpool + const OpUnknown + const OpUpdateQueue + func (o Op) String() string + type Page struct + Items []T + Next string + type Queue struct + CreatedAt time.Time + Name string + Settings QueueSettings + State QueueState + Stats MessageStats + UID string + type QueueDeleteMode uint + const QueueDeleteModeDrain + const QueueDeleteModeForce + const QueueDeleteModeUnknown + func ParseQueueDeleteMode(s string) (QueueDeleteMode, error) + func (q QueueDeleteMode) String() string + type QueueLimitError struct + Max int64 + func (e *QueueLimitError) Error() string + type QueueNotFoundError struct + Queue string + func (e *QueueNotFoundError) Error() string + type QueueReplacedError struct + UID string + func (e *QueueReplacedError) Error() string + type QueueRequest struct + Queue string + Spool string + type QueueSettings struct + DedupWindowSeconds int + EffectiveRetentionSeconds int + LeaseTimeoutSeconds int + MaxRetries int + RecvRateLimit RateLimit + RetentionSeconds int + type QueueSettingsCreate struct + DedupWindowSeconds *int + LeaseTimeoutSeconds *int + MaxRetries *int + RecvRateLimit *RateLimit + RetentionSeconds *int + type QueueSettingsUpdate struct + DedupWindowSeconds *int + LeaseTimeoutSeconds *int + MaxRetries *int + RecvRateLimit *RateLimit + RetentionSeconds *int + type QueueState uint + const QueueStateActive + const QueueStateDeleting + const QueueStateDraining + const QueueStateUnknown + func (s QueueState) String() string + type QueuesRequest struct + After string + Limit int + Match *regexp.Regexp + Spool string + type RateLimit struct + Burst int + IntervalMicros int64 + func (r RateLimit) IsZero() bool + type RateLimitedError struct + RetryAfter time.Duration + func (e *RateLimitedError) Error() string + type RecoverRequest struct + DelaySeconds int + Handle Handle + Spool string + type RecvRequest struct + Queue string + Spool string + Stream bool + WaitSeconds *int + type RecvResult struct + CreatedAt time.Time + Data []byte + DataSize int64 + DataStream io.ReadCloser + ID string + Lease Lease + LeaseExpiresAt time.Time + Retries int + type ReleaseRequest struct + DelaySeconds int + Lease Lease + Spool string + type RenewRequest struct + Lease Lease + Spool string + type RenewResult struct + LeaseExpiresAt time.Time + type RequestTrace struct + Op Op + Queue string + Spool string + func (t RequestTrace) LogValue() slog.Value + type RetentionLimitError struct + Max time.Duration + func (e *RetentionLimitError) Error() string + type SendRequest struct + Data []byte + DataSource DataSource + Dedup Dedup + DelaySeconds int + Queue string + RetryUnknown bool + ReturnHandle bool + Spool string + type SendResult struct + Duplicate bool + Handle Handle + ID string + type Spool struct + Name string + QueueCount int64 + Stats MessageStats + type SpoolFullError struct + Limit SpoolLimit + Max int64 + func (e *SpoolFullError) Error() string + type SpoolLimit uint + const SpoolLimitDataBytes + const SpoolLimitMessages + const SpoolLimitUnknown + func (l SpoolLimit) String() string + type SpoolRequest struct + Spool string + type UnknownHeaderError struct + Header string + func (e *UnknownHeaderError) Error() string + type UpdateQueueRequest struct + Queue string + QueueUID *string + Settings QueueSettingsUpdate + Spool string