EventStoreClient
An easy-to use GRPC API client for connecting ruby applications with EventStoreDB.
Requirements
event_store_client gem requires:
- ruby 2.7 or newer.
- EventstoreDB version
>= "20.*".
Installation
Add this line to your application's Gemfile:
gem 'event_store_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install event_store_client
Usage
Before you start, make sure you are connecting to a running EventStoreDB instance. For a detailed guide see: EventStoreServerSetup
See documentation chapters for the usage reference:
- Configuration
- Appending events
- Reading events
- Catch-up subscriptions
- Linking events
- Deleting streams
- Encrypting events
Subscriptions
We have written a gem that helps you to manage and handle Catch-up Subscriptions - event_store_subscription. You could check it here.
Contributing
Do you want to contribute? Welcome!
- Fork repository
- Create Issue
- Create PR ;)
Re-generating GRPC files from Proto
If you need to re-generate GRPC files from Proto files - there is a tool to do it. Just run this command:
bin/rebuild_protos
Running tests and development console
You will have to install Docker first. It is needed to run EventStore DB. You can run EventStore DB with this command:
docker-compose -f docker-compose-cluster.yml up
Now you can enter the dev console by running bin/console or run tests by running rspec command.
Publishing a new version
- Push commit with updated
version.rbfile to thereleasebranch. The new version will be automatically pushed to rubygems. - Create release on github including change log.
License
The gem is available as open source under the terms of the MIT License.