MCPcopy Create free account
hub / github.com/fullstorydev/grpcurl / DefaultEventHandler

Struct DefaultEventHandler

format.go:437–450  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

435// safe for use with InvokeRPC as long as NumResponses and Status are not read
436// until the call to InvokeRPC completes.
437type 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected