Skip to content

c-cube/micronats.ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micronats: minimal NATS client for OCaml/Eio

build

A lightweight NATS client library for OCaml >= 5.1 built on Eio.

Example

open Eio.Std

let () =
  Eio_main.run @@ fun env ->
  let net = Eio.Stdenv.net env in
  Eio.Switch.run @@ fun sw ->
  let@ nats = Micronats.with_connect ~sw ~net () in
  let _sub = Micronats.sub nats ~sw ~subject:["greetings"]
    (fun msg -> traceln "received: %s" msg.payload)
  in
  Micronats.pub nats ~subject:["greetings"] "hello, world!"

Install

(once released)

opam install micronats

License

MIT

About

Small NATS client for OCaml + Eio

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors