jrpc

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorRpcNotConnected = errors.New("rpc not connected")
)

Functions

func Call added in v1.0.15

func Call(address string, method string, args any, reply any) error

* * CallRpc: Calls a remote procedure * @param address string, method string, args any, reply any * @return error *

func Close

func Close()

* * Close *

func HttpListRouters added in v1.0.11

func HttpListRouters(w http.ResponseWriter, r *http.Request)

* * HttpListRouters * @param w http.ResponseWriter * @param r *http.Request *

func Mount

func Mount(host string, services any) (map[string]et.Json, error)

* * Mount * @param host string, services any * @return (map[string]et.Json, error) *

func Start added in v0.1.0

func Start(port int) error

* * Start * @param port int *

Types

type Package

type Package struct {
	Name    string    `json:"name"`
	Host    string    `json:"host"`
	Port    int       `json:"port"`
	Solvers []*Solver `json:"routes"`
}

func NewPackage added in v0.1.16

func NewPackage(name string, host string, port int) *Package

* * NewPackage * @param name string, host string, port int * @return *Package *

func (*Package) Mount added in v1.0.15

func (s *Package) Mount(services any) error

* * Mount * @param services any * @return error *

func (*Package) ToJson added in v1.0.15

func (s *Package) ToJson() et.Json

* * ToJson * @return et.Json *

type Solver

type Solver struct {
	Method string   `json:"method"`
	Inputs []string `json:"inputs"`
	Output []string `json:"output"`
}

Jump to

Keyboard shortcuts

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