Documentation
¶
Index ¶
Constants ¶
View Source
const (
MessageTypeCompositionProcessing = "composition_processing"
)
View Source
const (
TopicCompositionProcessing = "composition-processing"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessage ¶
type BaseMessage struct {
Type string `json:"type"`
}
BaseMessage is the base structure for all queue messages
type CompositionProcessingMessage ¶
type CompositionProcessingMessage struct {
BaseMessage
ArtID string `json:"art_id"`
CompositionID string `json:"composition_id"`
}
CompositionProcessingMessage is the message for composition processing
func NewCompositionProcessingMessage ¶
func NewCompositionProcessingMessage(artID, compositionID string) *CompositionProcessingMessage
func (*CompositionProcessingMessage) FromJSON ¶
func (m *CompositionProcessingMessage) FromJSON(data []byte) error
func (*CompositionProcessingMessage) ToJSON ¶
func (m *CompositionProcessingMessage) ToJSON() ([]byte, error)
type PostgresOptions ¶
type PostgresOptions struct {
MaxAttempts int
PollInterval time.Duration
VisibilityTimeout time.Duration
BaseBackoff time.Duration
}
PostgresOptions tunes PostgresQueue. Zero values mean defaults.
type PostgresQueue ¶
type PostgresQueue struct {
// contains filtered or unexported fields
}
PostgresQueue implements Queue with FOR UPDATE SKIP LOCKED.
func NewPostgresQueue ¶
func NewPostgresQueue(db *sql.DB, opts PostgresOptions) *PostgresQueue
NewPostgresQueue wraps an existing *sql.DB. It does not close the DB.
func (*PostgresQueue) Close ¶
func (q *PostgresQueue) Close() error
Close cancels in-flight Subscribe loops. Does not close the *sql.DB.
Click to show internal directories.
Click to hide internal directories.