...
1 package mocks
2
3 import (
4 "encoding/json"
5 "time"
6
7 ldevents "github.com/launchdarkly/go-sdk-events/v2"
8 )
9
10
11 type CapturingEventProcessor struct {
12 Events []interface{}
13 }
14
15 func (c *CapturingEventProcessor) RecordEvaluation(e ldevents.EvaluationData) {
16 c.Events = append(c.Events, e)
17 }
18
19 func (c *CapturingEventProcessor) RecordIdentifyEvent(e ldevents.IdentifyEventData) {
20 c.Events = append(c.Events, e)
21 }
22
23 func (c *CapturingEventProcessor) RecordCustomEvent(e ldevents.CustomEventData) {
24 c.Events = append(c.Events, e)
25 }
26
27 func (c *CapturingEventProcessor) RecordRawEvent(e json.RawMessage) {
28 c.Events = append(c.Events, e)
29 }
30
31 func (c *CapturingEventProcessor) Flush() {}
32
33 func (c *CapturingEventProcessor) FlushBlocking(time.Duration) bool { return true }
34
35 func (c *CapturingEventProcessor) Close() error {
36 return nil
37 }
38
View as plain text