Versions in this module Expand all Collapse all v0 v0.0.2 Oct 15, 2024 Changes in this version + var ErrConnClosing = connectionErrorf(true, nil, "transport is closing") + var ErrHeaderListSizeLimitViolation = status.Error(codes.Internal, ...) + var ErrIllegalHeaderWrite = status.Error(codes.Internal, "transport: SendHeader called multiple times") + var HTTPStatusConvTab = map[int]codes.Code + var MaxStreamID = uint32(math.MaxInt32 * 3 / 4) + func ContextErr(err error) error + func GetConnection(ctx context.Context) net.Conn + func SetConnection(ctx context.Context, conn net.Conn) context.Context + type CallHdr struct + ContentSubtype string + Creds credentials.PerRPCCredentials + DoneFunc func() + Host string + Method string + PreviousAttempts int + SendCompress string + type ClientTransport interface + Close func(err error) + CloseStream func(stream *Stream, err error) + Error func() <-chan struct{} + GetGoAwayReason func() (GoAwayReason, string) + GoAway func() <-chan struct{} + GracefulClose func() + IncrMsgRecv func() + IncrMsgSent func() + NewStream func(ctx context.Context, callHdr *CallHdr) (*Stream, error) + RemoteAddr func() net.Addr + Write func(s *Stream, hdr []byte, data []byte, opts *Options) error + func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, ...) (ClientTransport, error) + type ConnectOptions struct + ChannelzParent *channelz.SubChannel + CredsBundle credentials.Bundle + Dialer func(context.Context, string) (net.Conn, error) + FailOnNonTempDialError bool + InitialConnWindowSize int32 + InitialWindowSize int32 + KeepaliveParams keepalive.ClientParameters + MaxHeaderListSize *uint32 + PerRPCCredentials []credentials.PerRPCCredentials + ReadBufferSize int + SharedWriteBuffer bool + StatsHandlers []stats.Handler + TransportCredentials credentials.TransportCredentials + UseProxy bool + UserAgent string + WriteBufferSize int + type ConnectionError struct + Desc string + func (e ConnectionError) Error() string + func (e ConnectionError) Origin() error + func (e ConnectionError) Temporary() bool + func (e ConnectionError) Unwrap() error + type GoAwayReason uint8 + const GoAwayInvalid + const GoAwayNoReason + const GoAwayTooManyPings + type NewStreamError struct + AllowTransparentRetry bool + Err error + func (e NewStreamError) Error() string + type Options struct + Last bool + type ServerConfig struct + ChannelzParent *channelz.Server + ConnectionTimeout time.Duration + Credentials credentials.TransportCredentials + HeaderTableSize *uint32 + InTapHandle tap.ServerInHandle + InitialConnWindowSize int32 + InitialWindowSize int32 + KeepaliveParams keepalive.ServerParameters + KeepalivePolicy keepalive.EnforcementPolicy + MaxHeaderListSize *uint32 + MaxStreams uint32 + ReadBufferSize int + SharedWriteBuffer bool + StatsHandlers []stats.Handler + WriteBufferSize int + type ServerTransport interface + Close func(err error) + Drain func(debugData string) + HandleStreams func(context.Context, func(*Stream)) + IncrMsgRecv func() + IncrMsgSent func() + Peer func() *peer.Peer + 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(conn net.Conn, config *ServerConfig) (_ ServerTransport, err error) + type Stream struct + func (s *Stream) BytesReceived() bool + func (s *Stream) ClientAdvertisedCompressors() []string + 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) HeaderWireLength() int + func (s *Stream) Method() string + func (s *Stream) Read(p []byte) (n int, err error) + func (s *Stream) RecvCompress() string + func (s *Stream) SendCompress() string + func (s *Stream) SendHeader(md metadata.MD) error + func (s *Stream) SetContext(ctx context.Context) + func (s *Stream) SetHeader(md metadata.MD) error + func (s *Stream) SetSendCompress(name string) error + 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 + func (s *Stream) Unprocessed() bool