Documentation ¶
Index ¶
Constants ¶
View Source
const ( Version = "2.0" DefaultID = 1 TimeOut = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithServiceName ¶
func WithServiceName(serviceName ServiceName) Option
func WithTimeOut ¶
type Parameter ¶
type Parameter struct { // 配置 Config // contains filtered or unexported fields }
参数
type ReqArgs ¶
type ReqArgs struct { JsonRpc string `json:"jsonrpc"` Method Method `json:"method"` Params interface{} `json:"params"` ID uint8 `json:"id"` }
请求参数
type Resp ¶
type Resp struct { JsonRpc string `json:"jsonrpc"` Result interface{} `json:"result"` ID uint8 `json:"id"` Error interface{} `json:"error"` }
返回值
type Rpc ¶
type Rpc interface { GetConfig(name ModuleName) *Config ModuleName() ModuleName ServiceName() ServiceName }
服务标准
Click to show internal directories.
Click to hide internal directories.