postgres-es

Crates.iopostgres-es
lib.rspostgres-es
version0.4.12
sourcesrc
created_at2020-04-22 13:26:46.776454
updated_at2024-09-13 16:29:59.897679
descriptionA Postgres implementation of an event repository for cqrs-es.
homepage
repositoryhttps://github.com/serverlesstechnology/postgres-es
max_upload_size
id232928
size51,749
Serverless Technology (serverlesstechnology)

documentation

https://docs.rs/postgres-es

README

postgres-es

A Postgres implementation of the PersistedEventRepository trait in cqrs-es.


Usage

Add to your Cargo.toml file:

[dependencies]
cqrs-es = "0.4.11"
postgres-es = "0.4.11"

Requires access to a Postgres DB with existing tables. See:

A simple configuration example:

let store = default_postgress_pool("postgresql://my_user:my_pass@localhost:5432/my_db");
let cqrs = postgres_es::postgres_cqrs(pool, vec![])

Things that could be helpful:

Runtime and TLS configuration

This package defaults to expect the Tokio runtime and the Rustls library for TLS. If a different combination is desired the appropriate feature flag should be used:

  • runtime-tokio-native-tls
  • runtime-tokio-rustls (default)
  • runtime-async-std-native-tls
  • runtime-async-std-rustls
  • runtime-actix-native-tls
  • runtime-actix-rustls

Crates.io docs docs

Commit count: 121

cargo fmt