Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1 KB

README.md

File metadata and controls

40 lines (31 loc) · 1 KB

Run test case

hstreamdb_erl

Erlang driver for HStreamDB.

Build

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

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).