An open API service indexing awesome lists of open source software.

https://github.com/go-kratos/feature

Feature gates.
https://github.com/go-kratos/feature

feature-flags feature-gates features

Last synced: 30 days ago
JSON representation

Feature gates.

Awesome Lists containing this project

README

        

### Feature Gates
Feature gates are a set of key=value pairs that describe features. You can turn these features on or off using the `--feature-gates=foo=true,bar=false` command line flag on each component.

### Usage
```go
var foo = feature.MustRegister("Foo", false,
feature.WithFeatureStage(feature.StageAlpha),
feature.WithFeatureFromVersion("0.0.1"),
feature.WithFeatureToVersion("1.0.0"),
feature.WithFeatureDescription("A foo feature"),
)
if foo.Enabled() {
// TODO Feature
}
```
### References
- [Kubernetes Feature Gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/)