NewTopicWithOptions is similar to NewTopic, but supports TopicOptions.
(opts *TopicOptions)
| 145 | |
| 146 | // NewTopicWithOptions is similar to NewTopic, but supports TopicOptions. |
| 147 | func NewTopicWithOptions(opts *TopicOptions) *pubsub.Topic { |
| 148 | if opts == nil { |
| 149 | opts = &TopicOptions{} |
| 150 | } |
| 151 | return pubsub.NewTopic(&topic{}, &opts.BatcherOptions) |
| 152 | } |
| 153 | |
| 154 | // SendBatch implements driver.Topic.SendBatch. |
| 155 | // It is error if the topic is closed or has no subscriptions. |