You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
792 B
24 lines
792 B
package commCloud
|
|
|
|
import (
|
|
"fmt"
|
|
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol"
|
|
gocloud "github.com/mgr9525/go-cloud"
|
|
)
|
|
|
|
const (
|
|
RPCHostCode = 1
|
|
)
|
|
|
|
func NewReq(method string, ipr ...string) (*hbtp.Request, error) {
|
|
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
|
|
return hbtp.NewDoReq(host, RPCHostCode, method, ipr...)
|
|
}
|
|
func DoJson(method string, in, out interface{}, hd ...map[string]interface{}) error {
|
|
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
|
|
return hbtp.DoRPCJson(host, RPCHostCode, method, in, out, hd...)
|
|
}
|
|
func DoString(method string, in interface{}, hd ...hbtp.Mp) (int, []byte, error) {
|
|
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"])
|
|
return hbtp.DoRPCString(host, RPCHostCode, method, in, hd...)
|
|
}
|