breaking changes to pubsub client

37 views
Skip to first unread message

Michael Darakananda

unread,
May 2, 2017, 11:45:35 PM5/2/17
to google-api-go-announce
To support new Pubsub features, we're making a couple small breaking changes.

The first change: CreateSubscription now takes SubscriptionConfig struct.
Instead of writing
  c.CreateSubscription(ctx, subName, topic, 10*time.Second, nil)
you would write
  c.CreateSubscription(ctx, subName, pubsub.SubscriptionConfig{
    Topic: topic,
    AckDeadline: 10*time.Second,
  })
This is done to support new config fields.

The second change: Subscription's Config and ModifyPushConfig methods will return/accept the config struct by value. Currently, neither method allows nil pointers so there is little change in behavior.

Michael
Reply all
Reply to author
Forward
0 new messages