Documentation ¶
Index ¶
- type Connection
- func (c *Connection) AssignStreamID(s *Stream) func()
- func (c *Connection) Close() error
- func (c *Connection) GoAway(code http2.ErrCode) error
- func (c *Connection) GoAwayDebug(code http2.ErrCode, debug []byte) error
- func (c *Connection) Handshake() error
- func (c *Connection) ReleaseStreamID(s *Stream)
- func (c *Connection) ShouldProcess(streamID uint32) bool
- func (c *Connection) Stream() (*Stream, error)
- type InflowCtrl
- type OutflowCtrl
- type Stream
- func (s *Stream) Close() error
- func (s *Stream) CloseWithError(err error) error
- func (s *Stream) HandleWrite(ctx context.Context, writeAction func(context.Context) error) (err error)
- func (s *Stream) ID() uint32
- func (s *Stream) Read(b []byte) (n int, err error)
- func (s *Stream) ReadHeaders(ctx context.Context, headersCb func(k, v string) error) error
- func (s *Stream) Reset(code http2.ErrCode, isReceived bool) (err error)
- func (s *Stream) ResponseBodyStream(ctx context.Context) io.ReadCloser
- func (s *Stream) Valid() bool
- func (s *Stream) Write(b []byte) (n int, err error)
- func (s *Stream) WriteHeaders(ctx context.Context, enumHeaders func(func(k, v string)), last bool) error
- func (s *Stream) WriteRequestBody(ctx context.Context, data io.Reader, sz int64, last bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
func NewConnection ¶
func NewConnection(c net.Conn) *Connection
func (*Connection) AssignStreamID ¶
func (c *Connection) AssignStreamID(s *Stream) func()
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) GoAwayDebug ¶
func (c *Connection) GoAwayDebug(code http2.ErrCode, debug []byte) error
func (*Connection) Handshake ¶
func (c *Connection) Handshake() error
func (*Connection) ReleaseStreamID ¶
func (c *Connection) ReleaseStreamID(s *Stream)
func (*Connection) ShouldProcess ¶
func (c *Connection) ShouldProcess(streamID uint32) bool
ShouldProcess checks if stream should be retried on a new connection if some error occurred
func (*Connection) Stream ¶
func (c *Connection) Stream() (*Stream, error)
type InflowCtrl ¶
type OutflowCtrl ¶
type Stream ¶
type Stream struct { *Connection // contains filtered or unexported fields }
func (*Stream) CloseWithError ¶
func (*Stream) HandleWrite ¶
func (s *Stream) HandleWrite(ctx context.Context, writeAction func(context.Context) error) (err error)
HandleWrite handles errors and timeouts from [WriteHeaders] and [WriteRequestBody]
func (*Stream) ReadHeaders ¶
TODO: maybe change this api
func (*Stream) ResponseBodyStream ¶
func (s *Stream) ResponseBodyStream(ctx context.Context) io.ReadCloser
TODO: maybe change this api
Click to show internal directories.
Click to hide internal directories.