Versions in this module Expand all Collapse all v1 v1.14.0 Jul 31, 2018 Changes in this version + var ErrConnClosing = connectionErrorf(true, nil, "transport is closing") + var ErrHeaderListSizeLimitViolation = errors.New("transport: trying to send header list size larger than the limit set by peer") + var ErrIllegalHeaderWrite = errors.New("transport: the stream is done or WriteHeader was already called") + func ContextErr(err error) error + type CallHdr struct + ContentSubtype string + Creds credentials.PerRPCCredentials + Host string + Method string + PreviousAttempts int + SendCompress string + type ClientTransport interface + Close func() error + CloseStream func(stream *Stream, err error) + Error func() <-chan struct{} + GetGoAwayReason func() GoAwayReason + GoAway func() <-chan struct{} + GracefulClose func() error + IncrMsgRecv func() + IncrMsgSent func() + NewStream func(ctx context.Context, callHdr *CallHdr) (*Stream, error) + Write func(s *Stream, hdr []byte, data []byte, opts *Options) error + func NewClientTransport(connectCtx, ctx context.Context, target TargetInfo, opts ConnectOptions, ...) (ClientTransport, error) + type ConnectOptions struct + ChannelzParentID int64 + Dialer func(context.Context, string) (net.Conn, error) + FailOnNonTempDialError bool + InitialConnWindowSize int32 + InitialWindowSize int32 + KeepaliveParams keepalive.ClientParameters + MaxHeaderListSize *uint32 + PerRPCCredentials []credentials.PerRPCCredentials + ReadBufferSize int + StatsHandler stats.Handler + TransportCredentials credentials.TransportCredentials + UserAgent string + WriteBufferSize int + type ConnectionError struct + Desc string + func (e ConnectionError) Error() string + func (e ConnectionError) Origin() error + func (e ConnectionError) Temporary() bool + type GoAwayReason uint8 + const GoAwayInvalid + const GoAwayNoReason + const GoAwayTooManyPings + type Options struct + Last bool + type ServerConfig struct + AuthInfo credentials.AuthInfo + ChannelzParentID int64 + InTapHandle tap.ServerInHandle + InitialConnWindowSize int32 + InitialWindowSize int32 + KeepaliveParams keepalive.ServerParameters + KeepalivePolicy keepalive.EnforcementPolicy + MaxHeaderListSize *uint32 + MaxStreams uint32 + ReadBufferSize int + StatsHandler stats.Handler + WriteBufferSize int + type ServerTransport interface + Close func() error + Drain func() + HandleStreams func(func(*Stream), func(context.Context, string) context.Context) + IncrMsgRecv func() + IncrMsgSent func() + RemoteAddr func() net.Addr + Write func(s *Stream, hdr []byte, data []byte, opts *Options) error + WriteHeader func(s *Stream, md metadata.MD) error + WriteStatus func(s *Stream, st *status.Status) error + func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats stats.Handler) (ServerTransport, error) + func NewServerTransport(protocol string, conn net.Conn, config *ServerConfig) (ServerTransport, error) + type Stream struct + func (s *Stream) BytesReceived() bool + func (s *Stream) ContentSubtype() string + func (s *Stream) Context() context.Context + func (s *Stream) Done() <-chan struct{} + func (s *Stream) GoString() string + func (s *Stream) Header() (metadata.MD, error) + func (s *Stream) Method() string + func (s *Stream) Read(p []byte) (n int, err error) + func (s *Stream) RecvCompress() string + func (s *Stream) SendHeader(md metadata.MD) error + func (s *Stream) SetHeader(md metadata.MD) error + func (s *Stream) SetSendCompress(str string) + func (s *Stream) SetTrailer(md metadata.MD) error + func (s *Stream) Status() *status.Status + func (s *Stream) Trailer() metadata.MD + func (s *Stream) TrailersOnly() (bool, error) + func (s *Stream) Unprocessed() bool + type TargetInfo struct + Addr string + Authority string + Metadata interface{}