fasthttp2

package
v0.0.8-0...-19c1a77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAvailableStreams = errors.New("ran out of available streams")

Functions

func ConfigureServer

func ConfigureServer(s *fasthttp.Server) *http2.Server

ConfigureServer configures the fasthttp server to handle HTTP/2 connections. The HTTP/2 connection can be only established if the fasthttp server is using TLS.

Future implementations may support HTTP/2 through plain TCP.

func ConfigureServerAndConfig

func ConfigureServerAndConfig(s *fasthttp.Server, tlsConfig *tls.Config) *http2.Server

ConfigureServerAndConfig configures the fasthttp server to handle HTTP/2 connections and your own tlsConfig file. If you are NOT using your own tls config, you may want to use ConfigureServer.

func Do

Types

type ClientAdaptor

type ClientAdaptor struct {
	// contains filtered or unexported fields
}

func (*ClientAdaptor) AppendBody

func (adpr *ClientAdaptor) AppendBody(body []byte)

func (*ClientAdaptor) Close

func (adpr *ClientAdaptor) Close()

func (*ClientAdaptor) Error

func (adpr *ClientAdaptor) Error(err error)

func (*ClientAdaptor) Read

func (adpr *ClientAdaptor) Read(fr *http2.FrameHeader, dec *http2.HPACK) error

func (*ClientAdaptor) Write

func (adpr *ClientAdaptor) Write(id uint32, enc *http2.HPACK, writer chan<- *http2.FrameHeader)

type ServerAdaptor

type ServerAdaptor struct {
	// contains filtered or unexported fields
}

func NewServerAdaptor

func NewServerAdaptor(s *fasthttp.Server) *ServerAdaptor

func (*ServerAdaptor) OnFrame

func (sa *ServerAdaptor) OnFrame(
	strm *http2.Stream, fr *http2.FrameHeader, dec *http2.HPACK,
) error

func (*ServerAdaptor) OnNewStream

func (sa *ServerAdaptor) OnNewStream(c net.Conn, strm *http2.Stream)

func (*ServerAdaptor) OnRequestFinished

func (sa *ServerAdaptor) OnRequestFinished(
	strm *http2.Stream, enc *http2.HPACK, writer chan<- *http2.FrameHeader,
)

func (*ServerAdaptor) OnStreamEnd

func (sa *ServerAdaptor) OnStreamEnd(strm *http2.Stream)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL