Skip to main content
Version: v1.39.0

Bitbucket

The Bitbucket Retriever will perform an HTTP Request to the Bitbucket API to get your flags.

tip

Bitbucket has rate limits, be sure to correctly set your PollingInterval to avoid reaching the limit.

Example

err := ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &bitbucketretriever.Retriever{
RepositorySlug: "thomaspoignant/go-feature-flag",
Branch: "main",
FilePath: "testdata/flag-config.goff.yaml",
BitBucketToken: "XXXX",
Timeout: 2 * time.Second,
},
})
defer ffclient.Close()

Configuration fields

To configure the access to your GitLab file:

FieldDescription
BaseURL(optional)
The domain name of your Bitbucket instance
Default: https://api.bitbucket.org
RepositorySlugYour Gitlab slug org/repo-name.
FilePathThe path of your file.
Branch(optional)
The branch where your file is.
Default: main
BitBucketToken(optional)
Bitbucket token is used to access a private repository
Timeout(optional)
Timeout for the HTTP call
Default: 10 seconds

Get the latest GO Feature Flag updates