Exemple #1
0
func deleteSubscription(ctx context.Context, argv []string) {
	checkArgs(argv, 2)
	sub := argv[1]
	err := pubsub.DeleteSub(ctx, sub)
	if err != nil {
		log.Fatalf("DeleteSub failed, %v", err)
	}
	fmt.Printf("Subscription %s was deleted.\n", sub)
}
Exemple #2
0
// Teardown performs any cleanup logic that needs to be performed after the
// test is complete.
func (c *Peer) Teardown() {
	atomic.StoreInt32(&c.stopped, stopped)
	c.ackDone <- true
	pubsub.DeleteSub(c.context, c.subscription)
}