Versions in this module Expand all Collapse all v0 v0.1.1 Jul 2, 2020 v0.1.0 Jul 2, 2020 Changes in this version + func Publish(topic string, msg *pubsub.Message, opts ...PublishOption) error + func Shutdown() error + func String() string + func Subscribe(topic string, handler Handler, opts ...SubscribeOption) error + type Broker interface + Options func() Options + Publish func(topic string, m *pubsub.Message, opts ...PublishOption) error + Shutdown func() error + String func() string + Subscribe func(topic string, h Handler, opts ...SubscribeOption) error + var DefaultBroker Broker + func NewBroker(opts ...Option) Broker + type Event interface + Ack func() error + Error func() error + Message func() *Message + Topic func() string + type Handler func(context.Context, *pubsub.Message) error + type Message struct + Body []byte + Header map[string]string + type Option func(*Options) + func ClientOption(c ...option.ClientOption) Option + func CreateSubscription(b bool) Option + func DeleteSubscription(b bool) Option + func ErrorHandler(h Handler) Option + func ProjectID(id string) Option + type Options struct + Context context.Context + ErrorHandler Handler + type PublishOption func(*PublishOptions) + func PublishContext(ctx context.Context) PublishOption + type PublishOptions struct + Context context.Context + type SubscribeOption func(*SubscribeOptions) + func DisableAutoAck() SubscribeOption + func MaxExtension(d time.Duration) SubscribeOption + func MaxOutstandingMessages(max int) SubscribeOption + func Queue(name string) SubscribeOption + func SubscribeContext(ctx context.Context) SubscribeOption + type SubscribeOptions struct + AutoAck bool + Context context.Context + Queue string + func NewSubscribeOptions(opts ...SubscribeOption) SubscribeOptions + type Subscriber interface + Options func() SubscribeOptions + Topic func() string + Unsubscribe func() error