Documentation
¶
Index ¶
- func WithDeliverAfter(deliverAfter time.Duration) queue.CallOptions
- func WithDeliverAt(deliverAt time.Time) queue.CallOptions
- func WithMessage(message Message) queue.CallOptions
- func WithOrderingKey(OrderingKey string) queue.CallOptions
- func WithSync() queue.CallOptions
- type Conf
- type Message
- type PushOption
- type Pusher
- type QueueOption
- type Queues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDeliverAfter ¶
func WithDeliverAfter(deliverAfter time.Duration) queue.CallOptions
func WithDeliverAt ¶
func WithDeliverAt(deliverAt time.Time) queue.CallOptions
func WithMessage ¶
func WithMessage(message Message) queue.CallOptions
func WithOrderingKey ¶
func WithOrderingKey(OrderingKey string) queue.CallOptions
func WithSync ¶
func WithSync() queue.CallOptions
Types ¶
type Message ¶
type Message struct {
// Payload for the message
Payload []byte
// Value and payload is mutually exclusive, `Value interface{}` for schema message.
Value interface{}
// Key sets the key of the message for routing policy
Key string
// OrderingKey sets the ordering key of the message
OrderingKey string
// Properties attach application defined properties on the message
Properties map[string]string
// EventTime set the event time for a given message
// By default, messages don't have an event time associated, while the publish
// time will be be always present.
// Set the event time to a non-zero timestamp to explicitly declare the time
// that the event "happened", as opposed to when the message is being published.
EventTime time.Time
// ReplicationClusters override the replication clusters for this message.
ReplicationClusters []string
// DisableReplication disables the replication for this message
DisableReplication bool
// SequenceID sets the sequence id to assign to the current message
SequenceID *int64
// DeliverAfter requests to deliver the message only after the specified relative delay.
// Note: messages are only delivered with delay when a consumer is consuming
// through a `SubscriptionType=Shared` subscription. With other subscription
// types, the messages will still be delivered immediately.
DeliverAfter time.Duration
// DeliverAt delivers the message only at or after the specified absolute timestamp.
// Note: messages are only delivered with delay when a consumer is consuming
// through a `SubscriptionType=Shared` subscription. With other subscription
// types, the messages will still be delivered immediately.
DeliverAt time.Time
}
type PushOption ¶
type PushOption func(options *chunkOptions)
func WithChunkSize ¶
func WithChunkSize(chunkSize int) PushOption
func WithFlushInterval ¶
func WithFlushInterval(interval time.Duration) PushOption
type QueueOption ¶
type QueueOption func(*queueOptions)
func WithCommitInterval ¶
func WithCommitInterval(interval time.Duration) QueueOption
func WithMaxWait ¶
func WithMaxWait(wait time.Duration) QueueOption
func WithMetrics ¶
func WithMetrics(metrics *stat.Metrics) QueueOption
func WithQueueCapacity ¶
func WithQueueCapacity(queueCapacity int) QueueOption
type Queues ¶
type Queues struct {
// contains filtered or unexported fields
}
func MustNewQueue ¶
func MustNewQueue(c Conf, handler queue.Consumer, opts ...QueueOption) *Queues
Click to show internal directories.
Click to hide internal directories.