Skip to content

Add other client extensions#637

Merged
mtmk merged 12 commits into
mainfrom
other-client-extensions
Oct 7, 2024
Merged

Add other client extensions#637
mtmk merged 12 commits into
mainfrom
other-client-extensions

Conversation

@mtmk

@mtmk mtmk commented Sep 23, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

🙌 looking forward to this!

@rickdotnet rickdotnet left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread src/NATS.Client.KeyValueStore/INatsKVContext.cs Outdated
Comment thread src/NATS.Client.KeyValueStore/NatsKVContext.cs
Comment thread src/NATS.Client.KeyValueStore/NatsClientExtensions.cs Outdated
@mtmk
mtmk merged commit 3083db5 into main Oct 7, 2024
@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