Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
type Option ¶
type Option struct { // host should only be set for emulator Host string `uri:"host"` ProjectID string `uri:"project"` Subscription string `uri:"subscription"` Topic string `uri:"topic" required:"true"` JSONAuth string `uri:"jsonauth"` // if nil then the default nsq logger is used Logger *log.Logger }
Option are the settings to connect to a pubsub project instance.
func NewOption ¶
NewOption creates a set of default options for pubsub, host is only used for the fake emulator project is the google project (id) name subscription is the name of the pubsub subscription will be created if it doesn't exit topic is the pubsub topic, will be created if it doesn't exist jsonauth is the generated json string authorization settings for access to pubsub
func (*Option) NewConsumer ¶
NewConsumer creates a new consumer for reading messages from pubsub
func (*Option) NewProducer ¶
NewProducer will create a new pubsub producer for publishing messages to pubsub
Click to show internal directories.
Click to hide internal directories.