-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
assignment handling WIP #91
base: selki/node-sdk-relay
Are you sure you want to change the base?
assignment handling WIP #91
Conversation
@@ -0,0 +1,37 @@ | |||
import { EppoClientProxy } from './eppoClientProxy'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TESTS ARE AWESOME!
Don't worry about exhaustive coverage. The testing cluster should surface most issues
getAssignment(eppoClientInstance: EppoClient, assignmentRequestBody: AssignmentDto) { | ||
const method = this.assignmentTypeToMethod.get(assignmentRequestBody.assignmentType); | ||
|
||
const result = eppoClientInstance[method]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧠
|
||
export class EppoClientProxy { | ||
private readonly assignmentTypeToMethod = new Map([ | ||
['INTEGER', `getIntegerAssignment`], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backquote
@@ -0,0 +1,10 @@ | |||
import { IAssignmentEvent, IAssignmentLogger, IBanditEvent, IBanditLogger } from '@eppo/node-server-sdk'; | |||
|
|||
export class RelayLogger implements IAssignmentLogger, IBanditLogger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Don't worry about returning the logs with the assignment or bandit responses
No description provided.