Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Subscribe ¶
func Subscribe( ctx context.Context, project string, prefix string, topic string, worker func(ctx context.Context, msg *pubsub.Message) error, ) error
Subscribe does the following: 1) Create a subscriber within the instance. 2) Start a receiver in a goroutine. 3) Have a goroutine to delete the subscriber on server shutdown.
TODO(shifucun): Add unittest.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.