Documentation ¶
Overview ¶
Package google is a wrapper of the original "cloud.google.com/go/pubsub" library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is google pubsub client.
func New ¶
New to create new google pubsub client.
Required google service account credential. https://cloud.google.com/pubsub/docs/publish-receive-messages-client-library.
If you haven't set env "GOOGLE_APPLICATION_CREDENTIALS", you can provide the credential json file path in the param.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(ctx context.Context, topic string, handlerFunc _pubsub.HandlerFunc) error
Subscribe to subscribe topic.
func (*Client) Use ¶ added in v0.24.0
func (c *Client) Use(middlewares ...func(_pubsub.HandlerFunc) _pubsub.HandlerFunc)
Use to add pubsub middlewares.
Click to show internal directories.
Click to hide internal directories.