Skip to content
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

feat(GODT-2803): Allow access to IMAP state from connector #391

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

LBeernaertProton
Copy link
Contributor

Update connector interface so that it has access to the internal IMAP state of Gluon.

Similar to the DB design, there are modifiers for writing and reading from this state. This is required so that it remains compatible with how we are currently handling the database access code.

Finally, The StateConnectorInterface has been updated to return state updates for all actions, since it is now possible for connectors to apply IMAP state changes with each operation. Similar to previous changes, those state updates need to be kept around until the transaction has successfully committed.

This patch includes 3 example functions which cover the cases of reading, writing without updates and writing with updates. More should be added in the future as needed.

Update connector interface so that it has access to the internal IMAP
state of Gluon.

Similar to the DB design, there are modifiers for writing and reading
from this state. This is required so that it remains compatible with
how we are currently handling the database access code.

Finally, The `StateConnectorInterface` has been updated to return state
updates for all actions, since it is now possible for connectors to
apply IMAP state changes with each operation. Similar to previous
changes, those state updates need to be kept around until the
transaction has successfully committed.

This patch includes 3 example functions which cover the cases of
reading, writing without updates and writing with updates. More should
be added in the future as needed.
@LBeernaertProton LBeernaertProton merged commit 2bbedb1 into dev Aug 14, 2023
4 checks passed
@LBeernaertProton LBeernaertProton deleted the feat/GODT-2803-state-access branch August 14, 2023 07:50
cuthix pushed a commit to ProtonMail/proton-bridge that referenced this pull request Sep 15, 2023
Update to latest Gluon to allow access to the database for bridge. The
cache is placed in a `SharedCache` type to ensure that we respect calls
to `Connector.Close`.

In theory, this should never trigger an error, but this way we can catch
it if it happens.

ProtonMail/gluon#391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants