jrpc

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_PACKAGE_NOT_FOUND = "RPC package not load - %s"
	ERR_SERVER_NOT_FOUND  = "RPC server not found"
	ERR_METHOD_NOT_FOUND  = "RPC Method not found - %s"
	MSG_PACKAGE_NOT_FOUND = "Package not found"
	MSG_PACKAGE_DELETE    = "Package deleted"
	MSG_INVALID_RESPONSE  = "Invalid response - %s"
	MSG_NOT_LOAD_CONFIG   = "No se pudo cargar la configuración - stage: %s - name: %s"
)

Variables

This section is empty.

Functions

func CallItem

func CallItem(method string, args et.Json) (et.Item, error)

* * CallItem * @param method string, args et.Json * @return et.Item, error *

func CallItems

func CallItems(method string, args et.Json) (et.Items, error)

* * CallItems * @param method string, args et.Json * @return et.Items, error *

func CallJson

func CallJson(method string, args et.Json) (et.Json, error)

* * CallJson * @param method string, args et.Json * @return et.Json, error *

func CallList

func CallList(method string, args et.Json) (et.List, error)

* * CallList * @param method string, args et.Json * @return et.List, error *

func Close

func Close()

* * Close *

func HttpCalcItem added in v0.1.0

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

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

func ListRouters added in v0.1.0

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

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

func Load

func Load(name string) error

* * load *

func Mount

func Mount(services any) error

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

func Start added in v0.1.0

func Start() error

* * Start *

func UnMountPackage added in v0.1.1

func UnMountPackage(name string) error

* * UnMountPackage * @param name string * @return error *

Types

type Package

type Package struct {
	Name    string    `json:"name"`
	Host    string    `json:"host"`
	Port    int       `json:"port"`
	Solvers []*Solver `json:"routes"`
	// contains filtered or unexported fields
}

func LoadTo added in v0.1.0

func LoadTo(name, host string, port int) (*Package, error)

func (*Package) Describe added in v0.1.0

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

* * Describe * @return et.Json *

type Solver

type Solver struct {
	Host       string   `json:"host"`
	Port       int      `json:"port"`
	StructName string   `json:"structName"`
	Method     string   `json:"method"`
	Inputs     et.Json  `json:"inputs"`
	Output     []string `json:"output"`
}

type Storage added in v0.1.1

type Storage struct {
	Packages []*Package
}

Jump to

Keyboard shortcuts

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