Skip to content

Commit b9cc78b

Browse files
authored
fix: remove Status method from provider (#395)
Signed-off-by: Sahid Velji <[email protected]>
1 parent 9908b97 commit b9cc78b

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,6 @@ func (i MyFeatureProvider) Init(evaluationContext openfeature.EvaluationContext)
397397
// code to initialize your provider
398398
}
399399

400-
// Status expose the status of the provider
401-
func (i MyFeatureProvider) Status() openfeature.State {
402-
// The state is typically set during initialization.
403-
return openfeature.ReadyState
404-
}
405-
406400
// Shutdown define the shutdown operation of the provider
407401
func (i MyFeatureProvider) Shutdown() {
408402
// code to shutdown your provider

openfeature/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ func TestRequirement_1_7_1(t *testing.T) {
11911191

11921192
var clientI any = client
11931193
if _, ok := clientI.(requirements); !ok {
1194-
t.Fatal("client des not define a status accessor which indicates the readiness of the associated provider")
1194+
t.Fatal("client does not define a status accessor which indicates the readiness of the associated provider")
11951195
}
11961196

11971197
TestRequirement_5_3_5(t)

openfeature/provider.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ type Tracker interface {
7373
}
7474

7575
// NoopStateHandler is a noop StateHandler implementation
76-
// Status always set to ReadyState to comply with specification
7776
type NoopStateHandler struct{}
7877

7978
func (s *NoopStateHandler) Init(e EvaluationContext) error {
@@ -85,10 +84,6 @@ func (s *NoopStateHandler) Shutdown() {
8584
// NOOP
8685
}
8786

88-
func (s *NoopStateHandler) Status() State {
89-
return ReadyState
90-
}
91-
9287
// Eventing
9388

9489
// EventHandler is the eventing contract enforced for FeatureProvider

0 commit comments

Comments
 (0)