jrpc

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_PACKAGE_NOT_FOUND = "RPC package not load"
	ERR_SERVER_NOT_FOUND  = "RPC server not found"
	ERR_METHOD_NOT_FOUND  = "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"
)
View Source
const RPC_KEY = "apigateway-rpc"

Variables

This section is empty.

Functions

func CallItem added in v0.0.4

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

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

func CallItems added in v0.0.4

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

* * CallItems * @param method string * @param data et.Json * @return et.Item * @return error *

func CallJson added in v0.0.4

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

* * CallJson * @param method string * @param data et.Json * @return et.Json * @return error *

func CallList added in v0.0.4

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

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

func CallPermitios added in v0.0.4

func CallPermitios(method string, data et.Json) (map[string]bool, error)

* * CallPermitios * @param method string * @param data et.Json * @return map[string]bool * @return error *

func Close added in v0.0.4

func Close()

* * Close *

func DeleteRouters added in v0.0.4

func DeleteRouters(host, packageName string) (et.Item, error)

* * DeleteRouters * @param host string * @param packageName string * @return et.Item * @return error *

func GetRouters added in v0.0.4

func GetRouters() (et.Items, error)

* * GetRouters * @return et.Items * @return error *

func HttpCallRPC added in v0.0.4

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

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

func Mount added in v0.0.4

func Mount(services any) error

* * Mount * @param host string * @param port int * @param service any *

func UnMount added in v0.0.4

func UnMount() error

* * UnMount * @return error *

Types

type Package added in v0.0.4

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

func Load added in v0.0.4

func Load(name string) (*Package, error)

* * load *

func (*Package) Save added in v0.0.4

func (s *Package) Save() error

* * Save * @return error *

func (*Package) Start added in v0.0.4

func (s *Package) Start() error

* * Start *

type Solver added in v0.0.4

type Solver struct {
	PackageName string   `json:"packageName"`
	Host        string   `json:"host"`
	Port        int      `json:"port"`
	Method      string   `json:"method"`
	Inputs      []string `json:"inputs"`
	Output      []string `json:"outputs"`
}

func GetSolver added in v0.0.4

func GetSolver(method string) (*Solver, error)

* * GetSolver * @param method string * @return *Solver * @return error *

Jump to

Keyboard shortcuts

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