This feature offloads the logic on when to send the Finalize message into the SDK. When this functionality is enabled which is done by setting a value for AutoFlushReplyDelta in milliseconds, the SDK keeps track of when to fire the Finalize message and will do so after AutoFlushReplyDelta milliseconds from the last Interim message.
Some additional changes to note:
Had to rename the Mutex for the connection from mu -> muConn because a new mutex called muFinal was introduced for Finalize state to wrap the last interim time
MessageType struct had to be moved because the listen thread needs to inspect the messages types to keep track of this feature
Types of changes
What types of changes does your code introduce to the community Go SDK?
Put an x in the boxes that apply
[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update or tests (if none of the other choices apply)
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
Proposed changes
This feature offloads the logic on when to send the
Finalize
message into the SDK. When this functionality is enabled which is done by setting a value forAutoFlushReplyDelta
in milliseconds, the SDK keeps track of when to fire theFinalize
message and will do so afterAutoFlushReplyDelta
milliseconds from the last Interim message.Some additional changes to note:
mu
->muConn
because a new mutex calledmuFinal
was introduced for Finalize state to wrap the last interim timeMessageType
struct had to be moved because thelisten
thread needs to inspect the messages types to keep track of this featureTypes of changes
What types of changes does your code introduce to the community Go SDK? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
NA