Go-Nats-Api-Example

module
v0.0.0-...-77ed12a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2019 License: Apache-2.0

README

Go Report Card GoDoc

Go Nats API Example

This example show how to use Nats to create API. Project use Go modules to download dependencies. You can see dependencies in go.mod

Docker

How to install:

  1. Install Docker-CE (ubuntu)
  2. Install Docker compose
  3. In project root: sudo docker-compose up

Settings file

API settings file use RFC7159

Example settings.json (all settings is required) :

{
  "name": "api",
  "version": "1.0.0",
  "nats": {
    "version" : "1.4.2",
    "reconnectedWait" : 5,
    "address" : [
      {
        "host" : "localhost",
        "port" : "54222"
      },
      {
        "host" : "localhost",
        "port" : "54222"
      }
    ]
  }
}

Directories

Path Synopsis
cmd
pkg
v1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL