@@ -13,10 +13,11 @@ func NewDataCollectorHook(dataCollectorManager *controller.DataCollectorManager)
13
13
}
14
14
15
15
type dataCollectorHook struct {
16
+ openfeature.UnimplementedHook
16
17
dataCollectorManager * controller.DataCollectorManager
17
18
}
18
19
19
- func (d * dataCollectorHook ) After (ctx context.Context , hookCtx openfeature.HookContext ,
20
+ func (d * dataCollectorHook ) After (_ context.Context , hookCtx openfeature.HookContext ,
20
21
evalDetails openfeature.InterfaceEvaluationDetails , hint openfeature.HookHints ) error {
21
22
if evalDetails .Reason != openfeature .CachedReason {
22
23
// we send it only when cached because the evaluation will be collected directly in the relay-proxy
@@ -37,7 +38,7 @@ func (d *dataCollectorHook) After(ctx context.Context, hookCtx openfeature.HookC
37
38
return nil
38
39
}
39
40
40
- func (d * dataCollectorHook ) Error (ctx context.Context , hookCtx openfeature.HookContext ,
41
+ func (d * dataCollectorHook ) Error (_ context.Context , hookCtx openfeature.HookContext ,
41
42
err error , hint openfeature.HookHints ) {
42
43
event := model.FeatureEvent {
43
44
Kind : "feature" ,
@@ -52,12 +53,3 @@ func (d *dataCollectorHook) Error(ctx context.Context, hookCtx openfeature.HookC
52
53
}
53
54
_ = d .dataCollectorManager .AddEvent (event )
54
55
}
55
-
56
- func (d * dataCollectorHook ) Before (context.Context , openfeature.HookContext , openfeature.HookHints ) (* openfeature.EvaluationContext , error ) {
57
- // Do nothing, needed to satisfy the interface
58
- return nil , nil
59
- }
60
-
61
- func (d * dataCollectorHook ) Finally (context.Context , openfeature.HookContext , openfeature.HookHints ) {
62
- // Do nothing, needed to satisfy the interface
63
- }
0 commit comments