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

Method channelzRegistration

clientconn.go:513–517  ·  view source on GitHub ↗

channelzRegistration registers the newly created ClientConn with channelz and stores the returned identifier in `cc.channelz`. A channelz trace event is emitted for ClientConn creation. If the newly created ClientConn is a nested one, i.e a valid parent ClientConn ID is specified via a dial option,

(target string)

Source from the content-addressed store, hash-verified

511//
512// Doesn't grab cc.mu as this method is expected to be called only at Dial time.
513func (cc *ClientConn) channelzRegistration(target string) {
514 parentChannel, _ := cc.dopts.channelzParent.(*channelz.Channel)
515 cc.channelz = channelz.RegisterChannel(parentChannel, target)
516 cc.addTraceEvent(fmt.Sprintf("created for target %q", target))
517}
518
519// chainUnaryClientInterceptors chains all unary client interceptors into one.
520func chainUnaryClientInterceptors(cc *ClientConn) {

Callers 1

NewClientFunction · 0.95

Calls 2

addTraceEventMethod · 0.95
RegisterChannelFunction · 0.92

Tested by

no test coverage detected