v0.10.0
-
pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update.
-
pubsub: Subscription.Receive now runs concurrently for higher throughput.
-
vision: cloud.google.com/go/vision is deprecated. Use
cloud.google.com/go/vision/apiv1 instead. -
translation: now stable.
-
trace: several changes to the surface. See the link below.
Code changes required from v0.9.0
-
pubsub: Replace
sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"})with
sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"}, }) -
trace: traceGRPCServerInterceptor will be provided from *trace.Client.
Given an initialized*trace.Clientnamedtc, instead ofs := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc)))write
s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor())) -
trace trace.GRPCClientInterceptor will also provided from *trace.Client.
Instead ofconn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor()))write
conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())) -
trace: We removed the deprecated
trace.EnableGRPCTracing. Use the gRPC
interceptor as a dial option as shown below when initializing Cloud package
clients:c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))) if err != nil { ... }