MCPcopy
hub / github.com/grpc/grpc-go / InTapHandle

Function InTapHandle

server.go:532–539  ·  view source on GitHub ↗

InTapHandle returns a ServerOption that sets the tap handle for all the server transport to be created. Only one can be installed. # Experimental Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.

(h tap.ServerInHandle)

Source from the content-addressed store, hash-verified

530// Notice: This API is EXPERIMENTAL and may be changed or removed in a
531// later release.
532func InTapHandle(h tap.ServerInHandle) ServerOption {
533 return newFuncServerOption(func(o *serverOptions) {
534 if o.inTapHandle != nil {
535 panic("The tap handle was already set and may not be reset.")
536 }
537 o.inTapHandle = h
538 })
539}
540
541// StatsHandler returns a ServerOption that sets the stats handler for the server.
542func StatsHandler(h stats.Handler) ServerOption {

Callers 4

mainFunction · 0.92
listenAndServeMethod · 0.92
TestTapStatusDetailsMethod · 0.92
TestTapTimeoutMethod · 0.92

Calls 1

newFuncServerOptionFunction · 0.85

Tested by 3

listenAndServeMethod · 0.74
TestTapStatusDetailsMethod · 0.74
TestTapTimeoutMethod · 0.74