type chanServerStream … func (ss *chanServerStream) SendHeader(md metadata.MD) error { … } func (ss *chanServerStream) SetHeader(md metadata.MD) error { … } func (ss *chanServerStream) SetTrailer(md metadata.MD) { … } type chanClientStream … func (cs *chanClientStream) Header() (metadata.MD, error) { … } func (cs *chanClientStream) Trailer() metadata.MD { … } func (cs *chanClientStream) CloseSend() error { … } type chanStream … func (s *chanStream) Context() context.Context { … } func (s *chanStream) SendMsg(m interface{ … } func (s *chanStream) RecvMsg(m interface{ … } func newPipeStream(ctx context.Context, ssHandler func(chanServerStream) error) chanClientStream { … }