Skip to content

heartbytenet/goeu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Goeu

Goeu is a Go client for the Noeu database using leRPC protocol

Features

  • Websocket by default, HTTP as fallback
  • Multiple connections for reliability
  • Automatic connection regeneration

Installation

Install Goeu using the "go get" command:

go get -u github.com/heartbytenet/goeu

Example

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)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages