Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add izanami as feature flipping provider #2507

Merged
merged 10 commits into from
Apr 4, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions engine/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ type Configuration struct {
ClientID string `toml:"client_id"`
ClientSecret string `toml:"client_secret"`
Token string `toml;"token" comment:"Token shared between Izanami and CDS to be able to send webhooks from izanami"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toml;"token" -> toml:"token"

}
} `toml:"izanami" comment:"Feature flipping provider: https://maif.github.io/izanami"`
} `toml:"features" comment:"###########################\n CDS Features flipping Settings \n##########################"`
Schedulers struct {
Disabled bool `toml:"disabled" default:"false" commented:"true" comment:"This is mainly for dev purpose, you should not have to change it"`
Expand Down Expand Up @@ -362,9 +362,11 @@ func (a *API) Serve(ctx context.Context) error {
a.Config.SMTP.Disable)

// Initialize feature package
log.Info("Initializing feature flipping")
log.Info("Initializing feature flipping with izanami %s", a.Config.FeaturesFlipping.Izanami.ApiURL)
if a.Config.FeaturesFlipping.Izanami.ApiURL != "" {
feature.Init(a.Config.FeaturesFlipping.Izanami.ApiURL, a.Config.FeaturesFlipping.Izanami.ClientID, a.Config.FeaturesFlipping.Izanami.ClientSecret)
if err := feature.Init(a.Config.FeaturesFlipping.Izanami.ApiURL, a.Config.FeaturesFlipping.Izanami.ClientID, a.Config.FeaturesFlipping.Izanami.ClientSecret); err != nil {
return fmt.Errorf("Feature flipping not enabled with izanami: %s", err)
}
}

//Initialize artifacts storage
Expand Down