Documentation ¶
Index ¶
Constants ¶
View Source
const (
PubsubMetadataConsumerID = "pubsubConsumerID"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkHandler ¶
type BulkHandler func(ctx context.Context, msgs []*NewMessage) error
type BulkMessageEntry ¶
type BulkMessageEntry struct { EntryId string `json:"entryId"` //nolint:stylecheck Event []byte `json:"event"` ContentType string `json:"contentType,omitempty"` Metadata map[string]string `json:"metadata"` }
BulkMessageEntry represents a single message inside a bulk request.
type BulkPublishRequest ¶
type BulkPublishRequest struct { Entries []BulkMessageEntry `json:"entries"` PubsubName string `json:"pubsubname"` Topic string `json:"topic"` Metadata map[string]string `json:"metadata"` }
BulkPublishRequest is the request to publish mutilple messages.
type BulkPublishResponse ¶
type BulkPublishResponse struct {
FailedEntry []FailedEntry
}
type BulkPublisher ¶
type BulkPublisher interface {
BulkPublish(ctx context.Context, req *BulkPublishRequest) (*BulkPublishResponse, error)
}
type BulkSubscribeConfig ¶
type BulkSubscriber ¶
type BulkSubscriber interface {
BulkSubscribe(ctx context.Context, req *SubscribeRequest, handler BulkHandler) error
}
type FailedEntry ¶
type Feature ¶
type Feature string
Feature names a feature that can be implemented by PubSub components.
const ( // FeatureMessageTTL is the feature to handle message TTL. FeatureMessageTTL Feature = "MESSAGE_TTL" // FeatureSubscribeWildcards is the feature to allow subscribing to topics/queues using a wildcard. FeatureSubscribeWildcards Feature = "SUBSCRIBE_WILDCARDS" FeatureBulkPublish Feature = "BULK_PUBSUB" )
type NewMessage ¶
type NewMessage struct { Data []byte `json:"data"` Topic string `json:"topic"` Metadata map[string]string `json:"metadata"` ContentType *string `json:"contentType,omitempty"` }
NewMessage is an event arriving from a message bus instance.
type PublishRequest ¶
type SubscribeRequest ¶
type SubscribeRequest struct { Topic string `json:"topic"` Metadata map[string]string `json:"metadata"` BulkSubscribeConfig BulkSubscribeConfig `json:"bulkSubscribe,omitempty"` }
SubscribeRequest is the request to subscribe to a topic.
Click to show internal directories.
Click to hide internal directories.