Skip to content

Commit

Permalink
feat: added interval to the openfeature api source (#619)
Browse files Browse the repository at this point in the history
Signed-off-by: martin.coetzee <[email protected]>
Co-authored-by: martin.coetzee <[email protected]>
  • Loading branch information
dabump and martin.coetzee authored Apr 22, 2024
1 parent b6daece commit 18ac733
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/core/v1beta1/featureflagsource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ type Source struct {
// Selector is a flag configuration selector used by grpc provider
// +optional
Selector string `json:"selector,omitempty"`

// Interval is a flag configuration interval in seconds used by http provider
// +optional
Interval uint32 `json:"interval,omitempty"`
}

// FeatureFlagSourceStatus defines the observed state of FeatureFlagSource
Expand Down
3 changes: 3 additions & 0 deletions apis/core/v1beta1/featureflagsource_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func Test_FLagSourceConfiguration_Merge(t *testing.T) {
CertPath: "etc/cert.ca",
ProviderID: "app",
Selector: "source=database",
Interval: 5,
},
},
SyncProviderArgs: []string{"arg1", "arg2"},
Expand Down Expand Up @@ -74,6 +75,7 @@ func Test_FLagSourceConfiguration_Merge(t *testing.T) {
CertPath: "etc/cert.ca",
ProviderID: "app",
Selector: "source=database",
Interval: 5,
},
},
SyncProviderArgs: []string{"arg1", "arg2"},
Expand Down Expand Up @@ -154,6 +156,7 @@ func Test_FLagSourceConfiguration_Merge(t *testing.T) {
CertPath: "etc/cert.ca",
ProviderID: "app",
Selector: "source=database",
Interval: 5,
},
{
Source: "src2",
Expand Down

0 comments on commit 18ac733

Please sign in to comment.