Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerFunc ¶ added in v0.24.0
HandlerFunc is pubsub subscriber handler function.
type PubSub ¶
type PubSub interface { // Use to add pubsub middlewares. Use(middlewares ...func(HandlerFunc) HandlerFunc) // Publish message to specific topic/channel. Publish(ctx context.Context, topic string, message []byte) error // Subscribe to specific topic/channel. Subscribe(ctx context.Context, topic string, handlerFunc HandlerFunc) error // Close pubsub client connection. Close() error }
PubSub is pubsub interface.
See usage example in example folder.
Directories ¶
Path | Synopsis |
---|---|
Package google is a wrapper of the original "cloud.google.com/go/pubsub" library.
|
Package google is a wrapper of the original "cloud.google.com/go/pubsub" library. |
Package kafka is a wrapper of the original "github.com/segmentio/kafka-go" library.
|
Package kafka is a wrapper of the original "github.com/segmentio/kafka-go" library. |
Package mock_pubsub is a generated GoMock package.
|
Package mock_pubsub is a generated GoMock package. |
Package nop is no-operation pubsub.
|
Package nop is no-operation pubsub. |
Package nsq is a wrapper of the original "github.com/nsqio/go-nsq" library.
|
Package nsq is a wrapper of the original "github.com/nsqio/go-nsq" library. |
Package rabbitmq is a wrapper of the original "github.com/streadway/amqp" library.
|
Package rabbitmq is a wrapper of the original "github.com/streadway/amqp" library. |
Package redis is a wrapper of the original "github.com/redis/go-redis" library.
|
Package redis is a wrapper of the original "github.com/redis/go-redis" library. |
Click to show internal directories.
Click to hide internal directories.