MCPcopy Index your code
hub / github.com/koding/kite / runCallback

Method runCallback

request.go:122–132  ·  view source on GitHub ↗

runCallback is called when a callback method call is received from remote Kite.

(callback func(*dnode.Partial), args *dnode.Partial)

Source from the content-addressed store, hash-verified

120
121// runCallback is called when a callback method call is received from remote Kite.
122func (c *Client) runCallback(callback func(*dnode.Partial), args *dnode.Partial) {
123 // Do not panic no matter what.
124 defer func() {
125 if err := recover(); err != nil {
126 c.LocalKite.Log.Warning("Error in calling the callback function : %v", err)
127 }
128 }()
129
130 // Call the callback function.
131 callback(args)
132}
133
134// newRequest returns a new *Request from the method and arguments passed.
135func (c *Client) newRequest(method string, args *dnode.Partial) (*Request, func(interface{}, *Error)) {

Callers 1

readLoopMethod · 0.95

Calls 2

callbackFuncType · 0.85
WarningMethod · 0.80

Tested by

no test coverage detected