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

Add other client extensions #637

Merged
merged 12 commits into from
Oct 7, 2024
Merged

Add other client extensions #637

merged 12 commits into from
Oct 7, 2024

Conversation

mtmk
Copy link
Collaborator

@mtmk mtmk commented Sep 23, 2024

Refactor to use interfaces for enhanced flexibility and testability across various components like NatsJSContext and NatsConnection. Added new extension methods to easily create contexts for Object Store, Key-Value Store, and Services on NATS client and connection instances.

await using var client = new NatsClient();

// Use KeyValueStore extension method by referencing NATS.Client.KeyValueStore package
INatsKVContext kv = client.CreateKeyValueStoreContext();

// Use ObjectStore extension method by referencing NATS.Client.ObjectStore package
INatsObjContext obj = client.CreateObjectStoreContext();

// Use Services extension method by referencing NATS.Client.Services package
INatsSvcContext svc = client.CreateServicesContext();

Refactor to use interfaces for enhanced flexibility and testability across various components like NatsJSContext and NatsConnection. Added new extension methods to easily create contexts for Object Store, Key-Value Store, and Services on NATS client and connection instances.
Updated INatsObjStore, INatsKVContext, and INatsSvcContext interfaces to include public `Context` properties. This change ensures consistent access to the underlying context objects across various components.
@mtmk mtmk changed the title Other client extensions Add other client extensions Sep 23, 2024
@rickdotnet
Copy link
Collaborator

🙌 looking forward to this!

Copy link
Collaborator

@rickdotnet rickdotnet left a comment

Choose a reason for hiding this comment

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

LGTM. All comments are thought provoking.

src/NATS.Client.KeyValueStore/INatsKVContext.cs Outdated Show resolved Hide resolved
src/NATS.Client.KeyValueStore/NatsClientExtensions.cs Outdated Show resolved Hide resolved
@mtmk mtmk merged commit 3083db5 into main Oct 7, 2024
13 checks passed
@mtmk mtmk deleted the other-client-extensions branch October 7, 2024 14:38
mtmk added a commit that referenced this pull request Oct 8, 2024
* Add other client extensions (#637)
@mtmk mtmk mentioned this pull request Oct 8, 2024
mtmk added a commit that referenced this pull request Oct 8, 2024
* Add other client extensions (#637)
mtmk added a commit that referenced this pull request Oct 9, 2024
* Add placement configuration to key-value and object store (#650)
* Bump System.Text.Json from 8.0.4 to 8.0.5 in /src/NATS.Client.Core (#649)
* Add other client extensions (#637)
* Add Domain support for stream mirroring and sourcing and KV full support for the same. (#631)
* Add type-forwarders NET 5.0+ (#641)
* Add JetStream NATS Client Extensions (#598)
@mtmk mtmk mentioned this pull request Oct 9, 2024
mtmk added a commit that referenced this pull request Oct 9, 2024
* Add placement configuration to key-value and object store (#650)
* Bump System.Text.Json from 8.0.4 to 8.0.5 in /src/NATS.Client.Core (#649)
* Add other client extensions (#637)
* Add Domain support for stream mirroring and sourcing and KV full support for the same. (#631)
* Add type-forwarders NET 5.0+ (#641)
* Add JetStream NATS Client Extensions (#598)
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.

INatsClient Services API extensions INatsClient Object Store API extensions INatsClient KV API extensions
2 participants