Documentation
¶
Index ¶
- Constants
- func Call(host string, port int, method string, data et.Json) (et.Json, error)
- func CallItem(method string, data et.Json) (et.Item, error)
- func CallItems(method string, data et.Json) (et.Items, error)
- func CallJson(method string, data et.Json) (et.Json, error)
- func CallList(method string, data et.Json) (et.List, error)
- func CallPermitios(method string, data et.Json) (map[string]bool, error)
- func Close()
- func DeleteRouters(host, packageName string) (et.Item, error)
- func GetRouters() (et.Items, error)
- func HttpCallRPC(w http.ResponseWriter, r *http.Request)
- func Mount(services any) error
- func UnMount(host, name string) error
- type Package
- type Solver
Constants ¶
const ( ERR_PACKAGE_NOT_FOUND = "RPC package not load" ERR_SERVER_NOT_FOUND = "RPC server not found" ERR_METHOD_NAME_INVALID = "Method name invalid - %s" 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 = "Not load config - stage:%s name:%s" )
const RPC_KEY = "apigateway-rpc"
Variables ¶
This section is empty.
Functions ¶
func Call ¶
* * Call * @param host string, port int, method string, data et.Json * @return et.Json, error *
func CallItem ¶ added in v1.1.20
* * CallItem * @param method string, data et.Json * @return et.Item, error *
func CallItems ¶ added in v1.1.8
* * CallItems * @param method string, data et.Json * @return et.Items, error *
func CallJson ¶ added in v1.1.20
* * CallJson * @param method string, data et.Json * @return et.Json, error *
func CallList ¶ added in v1.1.8
* * CallList * @param method string, data et.Json * @return et.List, error *
func CallPermitios ¶ added in v1.1.20
* * CallPermitios * @param method string, data et.Json * @return map[string]bool, error *
func DeleteRouters ¶ added in v1.1.16
* * DeleteRouters * @param host string, packageName string * @return et.Item, error *
func GetRouters ¶
* * GetRouters * @return et.Items * @return error *
func HttpCallRPC ¶ added in v1.1.0
func HttpCallRPC(w http.ResponseWriter, r *http.Request)
* * HttpCallRPC * @param w http.ResponseWriter * @param r *http.Request *
Types ¶
type Package ¶ added in v1.1.7
type Package struct {
Name string `json:"name"`
Host string `json:"host"`
Port int `json:"port"`
Solvers map[string]*Solver `json:"routes"`
}
func NewPackage ¶ added in v1.1.99
* * NewPackage * @param name string, host string, port int * @return *Package *