Documentation ¶
Index ¶
- func ConstantBackoff(delay time.Duration) *constantBackoff
- func ExponentialBackoff(c float64, a float64, b float64, l time.Duration) *exponentialBackoff
- func Fatal(err error) error
- func IsFatal(err error) bool
- func LinearBackoff(c float64, k float64, l time.Duration) *linearBackoff
- func NewHTTPDestination(endpoint string) *httpDestination
- func NewPostgresDestination(db *sql.DB, options ...postgresDestinationOption) (*postgresDestination, error)
- func NewPostgresSource(db *sql.DB, options ...postgresSourceOption) (*postgresSource, error)
- func PostgresDestinationWithSchema(schema string) postgresDestinationOption
- func PostgresSourceWithIntervalTrigger(interval time.Duration) postgresSourceOption
- func PostgresSourceWithMaxWorkers(maxWorkers uint) postgresSourceOption
- func PostgresSourceWithNotifyTrigger(connectionString string) postgresSourceOption
- func PostgresSourceWithSchema(schema string) postgresSourceOption
- func PublisherWithAsyncBridge(maxAttempts int, waitBetweenAttempts int, destinations ...Destination) publisherOption
- func PublisherWithSyncBridge(destinations ...Destination) publisherOption
- func ReceiverWithSource(source Source) receiverOption
- func WithTx(ctx context.Context, tx sqlTx) context.Context
- type Backoff
- type Delivery
- type Destination
- type Message
- func (msg *Message) GetDeliverAt() time.Time
- func (msg *Message) GetName() string
- func (msg *Message) GetPayload(payload any) error
- func (msg *Message) GetPublishedAt() time.Time
- func (msg *Message) GetTopic() string
- func (msg *Message) GetUUID() string
- func (msg *Message) MarshalJSON() ([]byte, error)
- func (msg *Message) UnmarshalJSON(data []byte) error
- type MessageOption
- type OnMessageHandler
- type OnMessageMiddleware
- type PostgresSourceQueueDeclareParams
- type Publisher
- type Receiver
- func (r *Receiver) Deliver(ctx context.Context, delivery Delivery) error
- func (r *Receiver) GetMessagesWithHandlers(queue string) []string
- func (r *Receiver) GetQueuesWithHandlers() []string
- func (r *Receiver) On(queue string, name string, onMessage OnMessageHandler) error
- func (r *Receiver) Start(ctx context.Context) error
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstantBackoff ¶
func ExponentialBackoff ¶
func NewHTTPDestination ¶
func NewHTTPDestination(endpoint string) *httpDestination
func NewPostgresDestination ¶
func NewPostgresSource ¶
func PostgresDestinationWithSchema ¶
func PostgresDestinationWithSchema(schema string) postgresDestinationOption
func PostgresSourceWithMaxWorkers ¶
func PostgresSourceWithMaxWorkers(maxWorkers uint) postgresSourceOption
func PostgresSourceWithNotifyTrigger ¶
func PostgresSourceWithNotifyTrigger(connectionString string) postgresSourceOption
func PostgresSourceWithSchema ¶
func PostgresSourceWithSchema(schema string) postgresSourceOption
func PublisherWithAsyncBridge ¶
func PublisherWithAsyncBridge( maxAttempts int, waitBetweenAttempts int, destinations ...Destination, ) publisherOption
func PublisherWithSyncBridge ¶
func PublisherWithSyncBridge(destinations ...Destination) publisherOption
func ReceiverWithSource ¶
func ReceiverWithSource(source Source) receiverOption
Types ¶
type Destination ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶
func NewMessage(name string, payload any, options ...MessageOption) (*Message, error)
func (*Message) GetDeliverAt ¶
func (*Message) GetPayload ¶
func (*Message) GetPublishedAt ¶
func (*Message) MarshalJSON ¶
func (*Message) UnmarshalJSON ¶
type MessageOption ¶
type MessageOption func(*Message)
func WithDeliverAt ¶
func WithDeliverAt(when time.Time) MessageOption
type OnMessageMiddleware ¶
type OnMessageMiddleware func(next OnMessageHandler) OnMessageHandler
func WithBackoff ¶
func WithBackoff(backoff Backoff) OnMessageMiddleware
func WithLimit ¶
func WithLimit(limit int) OnMessageMiddleware
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func (*Publisher) OnDeliveryFailure ¶
func (*Publisher) PublishMany ¶
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
func NewReceiver ¶
func (*Receiver) GetMessagesWithHandlers ¶
func (*Receiver) GetQueuesWithHandlers ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.