Documentation ¶
Index ¶
- Constants
- func GenerateRequestTopic(guid string) string
- func GenerateResponseTopic(guid string) string
- func NewNervous(ctx context.Context, configAddress string, guid string) (Ng.Controller, error)
- func NewNervousMessage() Ng.Message
- func ReadJsonFile(address string) (map[string]interface{}, error)
- type BaseInfo
- type MethodInfo
- type ReturnInfo
Constants ¶
View Source
const RequestTopicPrefix = "REQ"
View Source
const ResponseTopicPrefix = "RES"
View Source
const TryInterval = 500
View Source
const TryTime = 5
Variables ¶
This section is empty.
Functions ¶
func GenerateRequestTopic ¶
func GenerateResponseTopic ¶
func NewNervous ¶
初始化总线 @param 上下文,配置文件目录,全局id @return 总线指针,错误
func NewNervousMessage ¶
func ReadJsonFile ¶
Types ¶
type MethodInfo ¶
type MethodInfo struct { BaseInfo RegisterName string `json:"register_name"` ParamArray []interface{} `json:"param_array"` }
func (*MethodInfo) FromJson ¶
func (m *MethodInfo) FromJson(jsonStr string) error
func (*MethodInfo) ToJson ¶
func (m *MethodInfo) ToJson() (string, error)
type ReturnInfo ¶
type ReturnInfo struct { BaseInfo Status int `json:"status"` ReturnValue interface{} `json:"return_value"` }
func (*ReturnInfo) FromJson ¶
func (r *ReturnInfo) FromJson(jsonStr string) error
func (*ReturnInfo) ToJson ¶
func (r *ReturnInfo) ToJson() (string, error)
Click to show internal directories.
Click to hide internal directories.