Documentation ¶
Index ¶
- Variables
- func ConfigureClient(c *fasthttp.HostClient) error
- func ConfigureServer(s *fasthttp.Server) *http2.Server
- func ConfigureServerAndConfig(s *fasthttp.Server, tlsConfig *tls.Config) *http2.Server
- func Do(c *http2.Client) fasthttp.TransportFunc
- type ClientAdaptor
- func (adpr *ClientAdaptor) AppendBody(body []byte)
- func (adpr *ClientAdaptor) Close()
- func (adpr *ClientAdaptor) Error(err error)
- func (adpr *ClientAdaptor) Read(fr *http2.FrameHeader, dec *http2.HPACK) error
- func (adpr *ClientAdaptor) Write(id uint32, enc *http2.HPACK, writer chan<- *http2.FrameHeader)
- type ServerAdaptor
- func (sa *ServerAdaptor) OnFrame(strm *http2.Stream, fr *http2.FrameHeader, dec *http2.HPACK) error
- func (sa *ServerAdaptor) OnNewStream(c net.Conn, strm *http2.Stream)
- func (sa *ServerAdaptor) OnRequestFinished(strm *http2.Stream, enc *http2.HPACK, writer chan<- *http2.FrameHeader)
- func (sa *ServerAdaptor) OnStreamEnd(strm *http2.Stream)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAvailableStreams = errors.New("ran out of available streams")
Functions ¶
func ConfigureClient ¶
func ConfigureClient(c *fasthttp.HostClient) error
TODO: checkout https://github.com/golang/net/blob/4acb7895a057/http2/transport.go#L570
func ConfigureServer ¶
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 ¶ added in v0.0.4
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.
Types ¶
type ClientAdaptor ¶ added in v0.0.2
type ClientAdaptor struct {
// contains filtered or unexported fields
}
func (*ClientAdaptor) AppendBody ¶ added in v0.0.2
func (adpr *ClientAdaptor) AppendBody(body []byte)
func (*ClientAdaptor) Close ¶ added in v0.0.2
func (adpr *ClientAdaptor) Close()
func (*ClientAdaptor) Error ¶ added in v0.0.2
func (adpr *ClientAdaptor) Error(err error)
func (*ClientAdaptor) Read ¶ added in v0.0.2
func (adpr *ClientAdaptor) Read(fr *http2.FrameHeader, dec *http2.HPACK) error
func (*ClientAdaptor) Write ¶ added in v0.0.2
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)
Click to show internal directories.
Click to hide internal directories.