Method
RegHandler
(method string, handler func(req *common.CliRpcRequest, resp *common.CliRpcResponse))
Source from the content-addressed store, hash-verified
| 65 | } |
| 66 | |
| 67 | func (this *CliRpcServer) RegHandler(method string, handler func(req *common.CliRpcRequest, resp *common.CliRpcResponse)) { |
| 68 | this.handlers[method] = handler |
| 69 | } |
| 70 | |
| 71 | func (this *CliRpcServer) GetHandler(method string) func(req *common.CliRpcRequest, resp *common.CliRpcResponse) { |
| 72 | handler, ok := this.handlers[method] |
Tested by
no test coverage detected