Skip to content

ituoga/mnc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mnc

micro wrapper around nats

env:

NATS_URL=nats://127.0.0.1:4222

package usage:

package main
import "github.com/ituoga/mnc"

type Response struct {
    Name string `json:"name"`
}

type Request struct {
    Name string `json:"name"`
}

func main() {
    response, err := mnc.Call[Response]("function.on.topic", Request{"hello world"})
    if err != nil {
        panic(err)
    }
    log.Printf("%+#v", response)
}

and you could simply test that app with natscli

https://github.com/nats-io/natscli

by runing

nats reply --echo "function.on.topic"

and go run yoruapp.main.go

About

micro wrapper around nats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages