sidebar_position | description |
---|---|
80 |
How to configure a Gitlab retriever. |
import { integrations } from "@site/data/integrations"; import {Mandatory, NotMandatory} from "@site/src/components/checks/checks"; export const retrieverName = 'GitLab'; export const info = integrations.retrievers.find((r) => r.name === retrieverName)
{info.longDescription ?? info.description}
:::tip
GitLab has rate limits, be sure to correctly set your PollingInterval
to avoid reaching the limit.
:::
To configure your relay proxy to use the {retrieverName} retriever, you need to add the following configuration to your relay proxy configuration file:
# ...
retrievers:
- kind: gitlab
repositorySlug: thomaspoignant/go-feature-flag
path: config/flag/my-flags.yaml
# ...
Field name | Mandatory | Type | Default | Description |
---|---|---|---|---|
kind |
string | none | Value should be gitlab .This field is mandatory and describes which retriever you are using. |
|
repositorySlug |
string | none | The repository slug of the GitLab repository where your file is located (ex: thomaspoignant/go-feature-flag ). |
|
path |
string | none | Path to the file inside the repository (ex: config/flag/my-flags.yaml ). |
|
baseUrl |
string | https://gitlab.com |
The base URL of your GitLab instance. | |
branch |
string | main |
The branch we should check in the repository. | |
token |
string | none | GitLab personal access token used to access a private repository (Create a personal access token). | |
timeout |
string | 10000 |
Timeout in millisecond used when calling GitLab. |
To configure your GO module to use the {retrieverName} retriever, you need to add the following
configuration to your ffclient.Config{}
object:
err := ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &gitlabretriever.Retriever{
RepositorySlug: "thomaspoignant/go-feature-flag",
Branch: "main",
FilePath: "testdata/flag-config.goff.yaml",
GitlabToken: "XXXX",
Timeout: 2 * time.Second,
BaseURL: "https://gitlab.com",
},
})
defer ffclient.Close()
Field | Mandatory | Description |
---|---|---|
BaseURL |
The domain name of your Gitlab instance Default: https://gitlab.com |
|
RepositorySlug |
Your Gitlab slug org/repo-name . |
|
FilePath |
The path of your file. | |
Branch |
The branch where your file is. Default: main |
|
GitlabToken |
GitLab token is used to access a private repository | |
Timeout |
Timeout for the HTTP call Default: 10 seconds |