chore(storage): include grpc enable direct path option
@@ -27,6 +27,7 @@ import (
storagepb "cloud.google.com/go/storage/internal/apiv2/stubs"
"google.golang.org/api/iterator"
"google.golang.org/api/option"
+ "google.golang.org/api/option/internaloption"
iampb "google.golang.org/genproto/googleapis/iam/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
@@ -88,6 +89,9 @@ func defaultGRPCOptions() []option.ClientOption {
option.WithGRPCDialOption(grpc.WithInsecure()),
option.WithoutAuthentication(),
)
+ } else {
+ // Only enable DirectPath when the emulator is not being targeted.
+ defaults = append(defaults, internaloption.EnableDirectPath(true))
}
return defaults
