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

Method Context

stream.go:806–814  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

804}
805
806func (cs *clientStream) Context() context.Context {
807 cs.commitAttempt()
808 // No need to lock before using attempt, since we know it is committed and
809 // cannot change.
810 if cs.attempt.transportStream != nil {
811 return cs.attempt.transportStream.Context()
812 }
813 return cs.ctx
814}
815
816func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) error {
817 cs.mu.Lock()

Callers 2

HeaderMethod · 0.95
finishMethod · 0.95

Calls 2

commitAttemptMethod · 0.95
ContextMethod · 0.65

Tested by

no test coverage detected