package
0.0.0-20190220103131-045890faf5e6
Repository: https://github.com/go-orion/orion.git
Documentation: pkg.go.dev
# README
pubsub
import "github.com/go-orion/Orion/utils/pubsub"
Overview
Imported Packages
- cloud.google.com/go/pubsub
- github.com/afex/hystrix-go/hystrix
- github.com/go-orion/Orion/utils/executor
- github.com/go-orion/Orion/utils/log
- github.com/go-orion/Orion/utils/pubsub/message_queue
- github.com/go-orion/Orion/utils/spanutils
Index
Package files
type Config
type Config struct {
Key string
Project string
Enabled bool
Timeout int
BulkPublishConcurrency int
Retries int
}
Config is the config for pubsub
type Service
type Service interface {
PublishMessage(ctx context.Context, topic string, data []byte, waitSync bool) (*goPubSub.PublishResult, error)
BulkPublishMessages(ctx context.Context, topic string, data [][]byte, waitSync bool)
SubscribeMessages(ctx context.Context, subscribe string, subscribeFunction messageQueue.SubscribeFunction) error
Close()
}
Service is the interface implemented by a pubsub service
func NewPubSubService
func NewPubSubService(config Config) Service
NewPubSubService build and returns an pubsub service handler
Generated by godoc2ghmd
# Packages
No description provided by the author
# Functions
NewPubSubService build and returns an pubsub service handler.
# Interfaces
Service is the interface implemented by a pubsub service.