in pcap-fsnotify/internal/gcs/client_library_exporter.go [224:259]
func (x *libraryExporter) initialize(
ctx context.Context,
) (*libraryExporter, error) {
client, err := storage.NewGRPCClient(ctx,
option.WithGRPCDialOption(
grpc.WithNoProxy(),
),
option.WithGRPCDialOption(
grpc.WithLocalDNSResolution(),
),
option.WithGRPCDialOption(
grpc.WithIdleTimeout(5*time.Minute),
),
option.WithGRPCDialOption(
grpc.WithContextDialer(x.dialContext),
),
option.WithGRPCDialOption(
grpc.WithKeepaliveParams(x.keepalive),
),
option.WithGRPCDialOption(
grpc.WithStreamInterceptor(x.streamInterceptor),
),
option.WithGRPCConnectionPool(2),
option.WithQuotaProject(x.projectID),
option.WithEndpoint(gcsEndpoint),
option.WithRequestReason("pcap-sidecar"),
option.WithUserAgent("pcap-sidecar"),
option.WithTelemetryDisabled(),
storage.WithDisabledClientMetrics(),
)
if err != nil {
return x, errors.Wrap(err, "failed to create gRPC GCS client")
}
return x.setBucketHandle(ctx, client)
}