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

Split the Client API in two #146

Merged
merged 5 commits into from
Oct 2, 2024
Merged

Split the Client API in two #146

merged 5 commits into from
Oct 2, 2024

Conversation

kegsay
Copy link
Member

@kegsay kegsay commented Sep 30, 2024

We want the Client API to be as small as possible, to make it as easy as possible to implement clients which can work with complement-crypto.

However, we also want to use that same API when writing tests, where it is desirable to have helper functions (typically of the form MustXXX).

To satisfy both, split the API in two, where the SDK authors implement the simple Client and the test suite then wraps that in another API called TestClient which handles all the nice helper functions.

For now, just convert MustStartSyncing to illustrate the design change. Next PR will move the remaining Must functions.

We want the Client API to be as small as possible, to make it as easy
as possible to implement clients which can work with complement-crypto.

However, we also want to use that same API when writing tests, where
it is desirable to have helper functions (typically of the form `MustXXX`).

To satisfy both, split the API in two, where the SDK authors implement
the simple `Client` and the test suite then wraps that in another API
called `TestClient` which handles all the nice helper functions.

For now, just convert `MustStartSyncing` to illustrate the design change.
Next PR will move the remaining Must functions.
@kegsay kegsay requested a review from andybalaam September 30, 2024 13:49
@kegsay kegsay mentioned this pull request Sep 30, 2024
Convert remaining Must functions to TestClient
@kegsay kegsay merged commit 87719af into main Oct 2, 2024
4 checks passed
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