-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: store less information per streaming client (#618)
This PR refactors the broadcaster and what it stores per client: I've created a new StreamingQuery struct that has only the data we need, I've moved the token storing from client group level to individual client level (and created a ClientData struct) I realized when setting up the tests for this that the Query, EdgeToken, and FilterQuery all contain more or less the same bits of data. But all we really need is: The actual token string (so that we can boot clients if the token expires) Name prefix, projects, and env. In the Unleash Types Query type, projects and env are optional, but we need them to be present to perform the calculation. So I created a StreamingQuery struct, which consolidates the data we need from the Query and EdgeToken. I also copied in the methods we use for this elsewhere in Unleash and slightly adapted them. I've added notes inline.
- Loading branch information
1 parent
435ef59
commit 7ecb244
Showing
2 changed files
with
93 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters