mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Set Minio user-agent for GCS calls (#5154)
This commit is contained in:
parent
b63c37b28e
commit
7d3eaf79ff
@ -39,6 +39,7 @@ import (
|
||||
cloudresourcemanager "google.golang.org/api/cloudresourcemanager/v1"
|
||||
"google.golang.org/api/googleapi"
|
||||
"google.golang.org/api/iterator"
|
||||
"google.golang.org/api/option"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -381,7 +382,9 @@ func newGCSGatewayLayer(projectID string) (GatewayLayer, error) {
|
||||
}
|
||||
|
||||
// Initialize a GCS client.
|
||||
client, err := storage.NewClient(ctx)
|
||||
// Send user-agent in this format for Google to obtain usage insights while participating in the
|
||||
// Google Cloud Technology Partners (https://cloud.google.com/partners/)
|
||||
client, err := storage.NewClient(ctx, option.WithUserAgent(fmt.Sprintf("Minio/%s (GPN:Minio;)", Version)))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user