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

Method GoWithTimeout

client.go:741–749  ·  view source on GitHub ↗

GoWithTimeout does the same thing with Go() method except it takes an extra argument that is the timeout for waiting reply from the remote Kite. If timeout is given 0, the behavior is same as Go().

(method string, timeout time.Duration, args ...interface{})

Source from the content-addressed store, hash-verified

739// extra argument that is the timeout for waiting reply from the remote Kite.
740// If timeout is given 0, the behavior is same as Go().
741func (c *Client) GoWithTimeout(method string, timeout time.Duration, args ...interface{}) chan *response {
742 // We will return this channel to the caller.
743 // It can wait on this channel to get the response.
744 responseChan := make(chan *response, 1)
745
746 c.sendMethod(method, args, timeout, responseChan)
747
748 return responseChan
749}
750
751// sendMethod wraps the arguments, adds a response callback,
752// marshals the message and send it over the wire.

Callers 3

TellWithTimeoutMethod · 0.95
GoMethod · 0.95
HandleRegisterMethod · 0.80

Calls 1

sendMethodMethod · 0.95

Tested by

no test coverage detected