You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MIGRATION.md 1.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Code Changes
  2. ## v0.10.0
  3. - pubsub: Replace
  4. ```
  5. sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"})
  6. ```
  7. with
  8. ```
  9. sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{
  10. PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"},
  11. })
  12. ```
  13. - trace: traceGRPCServerInterceptor will be provided from *trace.Client.
  14. Given an initialized `*trace.Client` named `tc`, instead of
  15. ```
  16. s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc)))
  17. ```
  18. write
  19. ```
  20. s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor()))
  21. ```
  22. - trace trace.GRPCClientInterceptor will also provided from *trace.Client.
  23. Instead of
  24. ```
  25. conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor()))
  26. ```
  27. write
  28. ```
  29. conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))
  30. ```
  31. - trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC
  32. interceptor as a dial option as shown below when initializing Cloud package
  33. clients:
  34. ```
  35. c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())))
  36. if err != nil {
  37. ...
  38. }
  39. ```