a function to register functions to be called for specific rpc calls
(pattern string, handler func([]interface{}) map[string]interface{})
| 52 | |
| 53 | //a function to register functions to be called for specific rpc calls |
| 54 | func HandleFunc(pattern string, handler func([]interface{}) map[string]interface{}) { |
| 55 | mainMux.Lock() |
| 56 | defer mainMux.Unlock() |
| 57 | mainMux.m[pattern] = handler |
| 58 | } |
| 59 | |
| 60 | //a function to be called if the request is not a HTTP JSON RPC call |
| 61 | func SetDefaultFunc(def func(http.ResponseWriter, *http.Request)) { |
no outgoing calls
no test coverage detected