DefaultEventHandler logs events to a writer. This is not thread-safe, but is safe for use with InvokeRPC as long as NumResponses and Status are not read until the call to InvokeRPC completes.
| 435 | // safe for use with InvokeRPC as long as NumResponses and Status are not read |
| 436 | // until the call to InvokeRPC completes. |
| 437 | type DefaultEventHandler struct { |
| 438 | Out io.Writer |
| 439 | Formatter Formatter |
| 440 | // 0 = default |
| 441 | // 1 = verbose |
| 442 | // 2 = very verbose |
| 443 | VerbosityLevel int |
| 444 | |
| 445 | // NumResponses is the number of responses that have been received. |
| 446 | NumResponses int |
| 447 | // Status is the status that was received at the end of an RPC. It is |
| 448 | // nil if the RPC is still in progress. |
| 449 | Status *status.Status |
| 450 | } |
| 451 | |
| 452 | // NewDefaultEventHandler returns an InvocationEventHandler that logs events to |
| 453 | // the given output. If verbose is true, all events are logged. Otherwise, only |
nothing calls this directly
no outgoing calls
no test coverage detected