Skip to content

Commit 4b99235

Browse files
authored
add get assignment methods with context (#77)
* add get assignment methods with context * add deprecation comment
1 parent 593d731 commit 4b99235

File tree

7 files changed

+445
-85
lines changed

7 files changed

+445
-85
lines changed

eppoclient/assignmentlogger.go

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

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

8+
// IAssignmentLogger is be deprecated at next major version
9+
// and replaced by IAssignmentLoggerContext
510
type IAssignmentLogger interface {
611
LogAssignment(event AssignmentEvent)
712
}
813

14+
type IAssignmentLoggerContext interface {
15+
LogAssignment(context.Context, AssignmentEvent)
16+
}
17+
918
// BanditActionLogger is going to be merged into IAssignmentLogger in
1019
// the next major version.
1120
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)