Skip to content

Google Cloud Storage

The Google Cloud Storage Retriever will use the google-cloud-storage package and google-api-options package to access your flag in Google Cloud Storage.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
err := ffclient.Init(ffclient.Config{
  PollingInterval: 3 * time.Second,
  Retriever: &gcstorageretriever.Retriever{
      Options: []option.ClientOption{option.WithoutAuthentication()
  },
  Bucket: "2093u4pkasjc3",
  Object: "flags.yaml",
  }
})
defer ffclient.Close()

Configuration fields

To configure your Google Cloud Storage file location:

Field Description
Bucket The name of your bucket.
Object The name of your object in your bucket.
Option An instance of option.ClientOption that configures your access to Google Cloud.
Check this documentation for more info.