Goeu is a Go client for the Noeu database using leRPC protocol
- Websocket by default, HTTP as fallback
- Multiple connections for reliability
- Automatic connection regeneration
Install Goeu using the "go get" command:
go get -u github.com/heartbytenet/goeu
package main
import (
"github.com/heartbytenet/goeu/pkg/goeu"
"log"
)
func main() {
g := (&goeu.Goeu{}).InitEnv()
err := g.Start(4)
if err != nil {
log.Fatalln(err)
}
var cmd goeu.ApiExecuteCommand
var res goeu.ApiExecuteResult
cmd = goeu.ApiExecuteCommand{
Namespace: "misc",
Method: "ping",
Params: map[string]interface{}{},
}
callback, err := g.Execute(&cmd, &res)
if err != nil {
log.Fatalln(err)
}
<- callback
log.Println(res)
}