()
| 81 | } |
| 82 | |
| 83 | func (k *Kite) addDefaultHandlers() { |
| 84 | // Default RPC methods |
| 85 | k.HandleFunc("kite.systemInfo", handleSystemInfo) |
| 86 | k.HandleFunc("kite.heartbeat", k.handleHeartbeat) |
| 87 | k.HandleFunc("kite.ping", handlePing).DisableAuthentication() |
| 88 | k.HandleFunc("kite.tunnel", handleTunnel) |
| 89 | k.HandleFunc("kite.log", k.handleLog) |
| 90 | k.HandleFunc("kite.print", handlePrint) |
| 91 | k.HandleFunc("kite.prompt", handlePrompt) |
| 92 | k.HandleFunc("kite.getPass", handleGetPass) |
| 93 | if runtime.GOOS == "darwin" { |
| 94 | k.HandleFunc("kite.notify", handleNotifyDarwin) |
| 95 | } |
| 96 | if k.WebRTCHandler != nil { |
| 97 | k.Handle(WebRTCHandlerName, k.WebRTCHandler) |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | // handleSystemInfo returns info about the system (CPU, memory, disk...). |
| 102 | func handleSystemInfo(r *Request) (interface{}, error) { |
no test coverage detected