Skip to content

Commit 868d9c5

Browse files
committed
add get assignment methods with context
1 parent 593d731 commit 868d9c5

File tree

7 files changed

+443
-85
lines changed

7 files changed

+443
-85
lines changed

eppoclient/assignmentlogger.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
package eppoclient
22

3-
import "fmt"
3+
import (
4+
"context"
5+
"fmt"
6+
)
47

58
type IAssignmentLogger interface {
69
LogAssignment(event AssignmentEvent)
710
}
811

12+
type IAssignmentLoggerContext interface {
13+
LogAssignment(context.Context, AssignmentEvent)
14+
}
15+
916
// BanditActionLogger is going to be merged into IAssignmentLogger in
1017
// the next major version.
1118
type BanditActionLogger interface {

eppoclient/bandits_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func Test_bandits_sdkTestData(t *testing.T) {
6161
logger := new(mockLogger)
6262
logger.Mock.On("LogAssignment", mock.Anything).Return()
6363
logger.Mock.On("LogBanditAction", mock.Anything).Return()
64-
client := newEppoClient(configStore, nil, nil, logger, applicationLogger)
64+
client := newEppoClient(configStore, nil, nil, logger, nil, applicationLogger)
6565

6666
tests := readJsonDirectory[banditTest]("test-data/ufc/bandit-tests/")
6767
for file, test := range tests {

0 commit comments

Comments
 (0)