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: cache client control plane operations #44

Merged
merged 5 commits into from
Jan 2, 2024
Merged

Conversation

anitarua
Copy link
Collaborator

@anitarua anitarua commented Dec 28, 2023

addresses #25 and creates integration test setup and teardown functions

@@ -12,7 +12,7 @@ void main() async {

var topicClient = TopicClient(
CredentialProvider.fromEnvironmentVariable("MOMENTO_API_KEY"),
Mobile.latest());
MobileTopicConfiguration.latest());
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

names clashed when both topic and cache configs were exported from the top-level lib/client_sdk_dart.dart file

CacheConfiguration configuration, Duration defaultTtl) {
_dataClient = DataClient(credentialProvider, configuration, defaultTtl);
_controlClient = ControlClient(credentialProvider, configuration);
// _logger.level = determineLoggerLevel(configuration.logLevel);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue captured in #36

_logger.finest("initializing cache client");
}

@override
Future<CreateCacheResponse> createCache(String cacheName) {
// TODO: add validators
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be added in #43 which will also round out all the basic cache operations

@anitarua anitarua mentioned this pull request Dec 28, 2023
class CreateCacheSuccess implements CreateCacheResponse {}

/// Indicates that the cache already exists, so there was nothing to do.
class CreateCacheAlreadyExists implements CreateCacheResponse {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about the name AlreadyExists instead of CreateCacheAlreadyExists?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's definitely more concise, I can change that 👍

});

group('control plane operations', () {
test('arguments are validated', () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like putting these placeholder tests here

Copy link
Collaborator

@bruuuuuuuce bruuuuuuuce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@anitarua anitarua merged commit a71ed4d into main Jan 2, 2024
1 check passed
@anitarua anitarua deleted the control-plane branch January 2, 2024 22:44
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.

None yet

2 participants