Documentation
¶
Index ¶
- type AcquireMessagesByTopicParams
- type DBTX
- type DeleteExpiredMessagesParams
- type DeleteMessagesByIdsParams
- type GetTopicExclusiveStatusRow
- type GetTopicForUpdateRow
- type InsertMaintenanceLeaseIfAbsentParams
- type InsertMessageParams
- type InsertTopicIfAbsentParams
- type MaintenanceLease
- type Message
- type Queries
- func (q *Queries) AcquireMessagesByTopic(ctx context.Context, db DBTX, arg AcquireMessagesByTopicParams) ([]*Message, error)
- func (q *Queries) DeleteExpiredMessages(ctx context.Context, db DBTX, arg DeleteExpiredMessagesParams) error
- func (q *Queries) DeleteMessagesByIds(ctx context.Context, db DBTX, arg DeleteMessagesByIdsParams) error
- func (q *Queries) GetAllTopics(ctx context.Context, db DBTX) ([]*Topic, error)
- func (q *Queries) GetOldestMessageInsertedAt(ctx context.Context, db DBTX, topic string) (pgtype.Timestamptz, error)
- func (q *Queries) GetTopicExclusiveStatus(ctx context.Context, db DBTX, topic string) (*GetTopicExclusiveStatusRow, error)
- func (q *Queries) GetTopicForUpdate(ctx context.Context, db DBTX, topic string) (*GetTopicForUpdateRow, error)
- func (q *Queries) GetTopicsWithExpiration(ctx context.Context, db DBTX) ([]*Topic, error)
- func (q *Queries) InsertMaintenanceLeaseIfAbsent(ctx context.Context, db DBTX, arg InsertMaintenanceLeaseIfAbsentParams) error
- func (q *Queries) InsertMessage(ctx context.Context, db DBTX, arg []InsertMessageParams) (int64, error)
- func (q *Queries) InsertTopicIfAbsent(ctx context.Context, db DBTX, arg InsertTopicIfAbsentParams) error
- func (q *Queries) RenewTopicExclusiveConsumer(ctx context.Context, db DBTX, arg RenewTopicExclusiveConsumerParams) error
- func (q *Queries) SelectMaintenanceLeaseForUpdate(ctx context.Context, db DBTX, topic string) (*SelectMaintenanceLeaseForUpdateRow, error)
- func (q *Queries) SetTopicExclusiveConsumer(ctx context.Context, db DBTX, arg SetTopicExclusiveConsumerParams) error
- func (q *Queries) UpdateMaintenanceLease(ctx context.Context, db DBTX, arg UpdateMaintenanceLeaseParams) error
- type RenewTopicExclusiveConsumerParams
- type SelectMaintenanceLeaseForUpdateRow
- type SetTopicExclusiveConsumerParams
- type Topic
- type UpdateMaintenanceLeaseParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBTX ¶
type DBTX interface {
Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
Query(context.Context, string, ...interface{}) (pgx.Rows, error)
QueryRow(context.Context, string, ...interface{}) pgx.Row
CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
}
type DeleteExpiredMessagesParams ¶ added in v0.2.0
type DeleteExpiredMessagesParams struct {
Topic string `json:"topic"`
Cutoff pgtype.Timestamptz `json:"cutoff"`
}
type GetTopicExclusiveStatusRow ¶ added in v0.2.0
type GetTopicExclusiveStatusRow struct {
ExclusiveConsumerID *uuid.UUID `json:"exclusive_consumer_id"`
ExclusiveConsumerExpiresAt pgtype.Timestamptz `json:"exclusive_consumer_expires_at"`
}
type GetTopicForUpdateRow ¶ added in v0.2.0
type GetTopicForUpdateRow struct {
ExclusiveConsumerID *uuid.UUID `json:"exclusive_consumer_id"`
ExclusiveConsumerExpiresAt pgtype.Timestamptz `json:"exclusive_consumer_expires_at"`
}
type InsertMaintenanceLeaseIfAbsentParams ¶ added in v0.2.0
type InsertMessageParams ¶
type InsertTopicIfAbsentParams ¶ added in v0.2.0
type MaintenanceLease ¶ added in v0.2.0
type MaintenanceLease struct {
Topic string `json:"topic"`
HolderID uuid.UUID `json:"holder_id"`
AcquiredAt pgtype.Timestamptz `json:"acquired_at"`
}
type Message ¶
type Message struct {
ID int64 `json:"id"`
InsertedAt pgtype.Timestamptz `json:"inserted_at"`
Topic string `json:"topic"`
Payload []byte `json:"payload"`
}
type Queries ¶
type Queries struct {
}
func (*Queries) AcquireMessagesByTopic ¶
func (*Queries) DeleteExpiredMessages ¶ added in v0.2.0
func (*Queries) DeleteMessagesByIds ¶
func (*Queries) GetAllTopics ¶ added in v0.2.0
func (*Queries) GetOldestMessageInsertedAt ¶ added in v0.2.0
func (*Queries) GetTopicExclusiveStatus ¶ added in v0.2.0
func (*Queries) GetTopicForUpdate ¶ added in v0.2.0
func (*Queries) GetTopicsWithExpiration ¶ added in v0.2.0
func (*Queries) InsertMaintenanceLeaseIfAbsent ¶ added in v0.2.0
func (*Queries) InsertMessage ¶
func (*Queries) InsertTopicIfAbsent ¶ added in v0.2.0
func (*Queries) RenewTopicExclusiveConsumer ¶ added in v0.2.0
func (*Queries) SelectMaintenanceLeaseForUpdate ¶ added in v0.2.0
func (*Queries) SetTopicExclusiveConsumer ¶ added in v0.2.0
func (*Queries) UpdateMaintenanceLease ¶ added in v0.2.0
type RenewTopicExclusiveConsumerParams ¶ added in v0.2.0
type RenewTopicExclusiveConsumerParams struct {
Topic string `json:"topic"`
ExclusiveConsumerID *uuid.UUID `json:"exclusive_consumer_id"`
ExclusiveConsumerExpiresAt pgtype.Timestamptz `json:"exclusive_consumer_expires_at"`
}
type SelectMaintenanceLeaseForUpdateRow ¶ added in v0.2.0
type SelectMaintenanceLeaseForUpdateRow struct {
HolderID uuid.UUID `json:"holder_id"`
AcquiredAt pgtype.Timestamptz `json:"acquired_at"`
}
type SetTopicExclusiveConsumerParams ¶ added in v0.2.0
type SetTopicExclusiveConsumerParams struct {
Topic string `json:"topic"`
ExclusiveConsumerID *uuid.UUID `json:"exclusive_consumer_id"`
ExclusiveConsumerExpiresAt pgtype.Timestamptz `json:"exclusive_consumer_expires_at"`
}
type UpdateMaintenanceLeaseParams ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.