micro / plugins

Go Micro plugins
Apache License 2.0
96 stars 92 forks source link

Add Natjs KeyValue Store #132

Closed kobergj closed 9 months ago

kobergj commented 10 months ago

Adds a store nats-js-kv based on nats-js KeyValue interface. Instead of using streams to store the data (like the nats-js store does) it will store the data in jetstreams key value stores.

Some implementation details:

I also needed to edit the .golangci.yml to make it possible getting green pipelines:

jochumdev commented 10 months ago

While I like the base32 encoding here for simplicity, I believe this should be optional. Yeah, can be by default on.

Why:

So what do you think?

kobergj commented 9 months ago

Yes. Good point. :+1: I introduced EncodeKeys option. Default is false because this is what I would expect.

kobergj commented 9 months ago

@jochumdev since this a new store and not just some fix or enhancement, I would very much appreciate your approve before I merge it