https://github.com/hstreamdb/hstreamdb_erl
Erlang Client for HStreamDB
https://github.com/hstreamdb/hstreamdb_erl
Last synced: 8 months ago
JSON representation
Erlang Client for HStreamDB
- Host: GitHub
- URL: https://github.com/hstreamdb/hstreamdb_erl
- Owner: hstreamdb
- License: apache-2.0
- Created: 2022-03-29T09:14:27.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T12:23:09.000Z (about 1 year ago)
- Last Synced: 2025-03-31T16:31:54.094Z (about 1 year ago)
- Language: Erlang
- Homepage:
- Size: 1.57 MB
- Stars: 7
- Watchers: 6
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/hstreamdb/hstreamdb_erl/actions/workflows/run_tests.yaml)
# `hstreamdb_erl`
Erlang driver for [HStreamDB](https://hstream.io).
## Build
```bash
rebar3 compile
```
## Run tests locally
```
make -C ./.ci up
./rebar3 ct --name 'test@127.0.0.1' -v -c
./rebar3 cover
make -C ./.ci down
```
## Use TLS
ref: [HStream docs](https://hstream.io/docs/en/latest/operation/security/overview.html)
```erl
start() ->
_ = application:ensure_all_started(hstreamdb_erl),
GrpcOpts =
#{gun_opts =>
#{transport => ssl,
transport_opts =>
[{verify, verify_peer},
{cacertfile, ?WS_PATH ++ "root_ca.crt"},
{certfile, ?WS_PATH ++ "client.crt"},
{keyfile, ?WS_PATH ++ "client.key"}]}},
Opts = #{url => ?SERVER_URL, rpc_options => GrpcOpts},
{ok, Client} = hstreamdb_client:start(test_client, Opts),
hstreamdb_client:echo(Client).
```