Skip to content

v0id3r/eh-nats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eh-nats

Eventbus with NATS/NATS Streaming backend for https://github.com/looplab/eventhorizon

Example init

Connection configuration

natsUrl := "nats://localhost:4222"
subject := "ehBus"
clusterId := "test-cluster"
clientId := "client-id"

Create connection

nc, err := nats.Connect(natsUrl)
conn, err := stan.Connect(clusterId, clientId, stan.NatsConn(nc))

or

conn, err := stan.Connect(clusterId, clientId, stan.NatsURL(natsUrl))

Create bus using connection

eventBus, err := nats.NewEventBus(conn, subject)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages