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

Method Trailer

internal/transport/transport.go:339–341  ·  view source on GitHub ↗

Trailer returns the cached trailer metadata. Note that if it is not called after the entire stream is done, it could return an empty MD. It can be safely read only after stream has ended that is either read or write have returned io.EOF.

()

Source from the content-addressed store, hash-verified

337// It can be safely read only after stream has ended that is either read
338// or write have returned io.EOF.
339func (s *Stream) Trailer() metadata.MD {
340 return s.trailer.Copy()
341}
342
343// Context returns the context of the stream.
344func (s *Stream) Context() context.Context {

Callers

nothing calls this directly

Calls 1

CopyMethod · 0.80

Tested by

no test coverage detected