Skip to main content
Version: v1.40.0

📦 Retrieve your feature flags configuration

The module supports different ways of retrieving the flag file.

To retrieve a file you need to provide a retriever in your ffclient.Config{} during the initialization.

Available retrievers:

info

In each retriever documentation, you will find the configuration needed to set up the retriever.

Explicitly call the retrievers

By default, the retrievers are called regularly to refresh the configuration based on the polling interval.

But there are use cases where you want to refresh the configuration explicitly (for example, during the CI process after you have changed your configuration file).

To do that, you can call the ForceRefresh method on the client.

// Init ffclient with a file retriever.
goff, _ := ffclient.New(ffclient.Config{
PollingInterval: 10 * time.Minute,
Retriever: &fileretriever.Retriever{
Path: "xxxx.yaml",
},
})

// ...
goff.ForceRefresh()
// ...