Skip to main content
Version: v1.34.3

Retrieve your feature flags configuration

The module supports different ways of retrieving the flag file.

Available retrievers

To retrieve a file you need to provide a retriever in your ffclient.Config{} during the initialization.
If the existing retriever does not work with your system you can extend the system and use a custom 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()
// ...

Get the latest GO Feature Flag updates