Jrpc2 NATS Channel

Build Coverage Status License

Status: EXPERIMENTAL

Package natschannel provides an implementation of the jrpc2 module’s Channel interface using NATS as the transport.

Documentation

GoDoc

Full go doc style documentation for the project can be viewed online without installing this package by using the excellent GoDoc site here: http://godoc.org/github.com/41north/natschannel.go

You can also view the documentation locally once the package is installed with the godoc tool by running godoc -http=":6060" and pointing your browser to http://localhost:6060/pkg/github.com/41north/natschannel.go

Installation

$ go get -u github.com/41north/natschannel.go

Add this import line to the file you’re working in:

import "github.com/41north/natschannel.go"

Quick Start

// connects to the nats server and binds the channel to the 'foo.bar' subject
channel, err := natschannel.Dial("nats://localhost:4222", "foo.bar")

// wraps an existing nats connection and binds the channel to the 'foo.bar' subject
channel, err := natschannel.New(conn, "foo.bar")

License

natschannel.go is licensed under the Apache 2.0 License

Contact

If you want to get in touch drop us an email at [email protected]

GitHub

View Github