mkdir gnalloy-app && cd gnalloy-app
go mod init example.com/gnalloy-app
go get gnalloy.org/codec-http2@dev
go doc gnalloy.org/codec-http2The current source tree exposes these package import paths:
gnalloy.org/codec-http2gnalloy.org/codec-http2/chunkedgnalloy.org/codec-http2/contentgnalloy.org/codec-http2/defensegnalloy.org/codec-http2/h2cgnalloy.org/codec-http2/http1bridgegnalloy.org/codec-http2/scheduler
Use go doc against the package that matches the behavior you need:
go doc gnalloy.org/codec-http2
go doc gnalloy.org/codec-http2/chunked
go doc gnalloy.org/codec-http2/content
go doc gnalloy.org/codec-http2/defense
go doc gnalloy.org/codec-http2/h2c
go doc gnalloy.org/codec-http2/http1bridge
go doc gnalloy.org/codec-http2/schedulerSelected current exported entry points:
const ClientPreface = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" ...const SettingHeaderTableSize uint16 = 0x1 ...const ErrorCodeCancel uint32 = 0x8var ErrInvalidFrame = errors.New("gnalloy/codec/http2: invalid frame") ...func AppendFrameHeader(dst []byte, h FrameHeader) ([]byte, error)type ConnectionController struct{ ... }type DataChunkedInput struct{ ... }type WriteHandler struct{}func NewDataCompressingInput(streamID http2.StreamID, input codec.ChunkedInput, coding Coding, ...) (*h2chunked.DataChunkedInput, error)type Coding stringtype DataCompressingInputConfig struct{ ... }type Decompressor struct{ ... }type ResponseCompressor struct{ ... }type ResponseCompressorConfig struct{ ... }var ErrTooManyRSTFrames = errors.New("gnalloy/codec/http2/defense: too many rst_stream frames") ...type ControlFrameLimitConfig struct{ ... }type ControlFrameLimitEncoder struct{ ... }type MaxRstFrameConfig struct{ ... }
Repository tests are executable examples of supported behavior. Start with the selected names below, then read the matching _test.go files for complete setup and assertions. See Testing and Performance for the complete discovered list.
GOWORK=off GOTOOLCHAIN=local go test ./... -run Test -count=1Selected current test, benchmark, fuzz, and example entry points:
BenchmarkStreamMultiplexerReadDataFuzzHTTP2FramePipelineTestApplyUpgradeHeadersAddsH2CHeadersTestCompressorCompressesAcceptedResponseStreamTestConnectionControllerAppliesAndValidatesSettingsTestConnectionControllerAppliesReceiveWindowUpdateTestConnectionControllerEnforcesMaxConcurrentRemoteStreamsTestConnectionControllerEnforcesReceiveConnectionWindowTestConnectionControllerRejectsNewLocalStreamAfterGoAwayTestConnectionControllerRejectsPushWhenPeerDisabledTestControlFrameLimitEncoderRejectsUnflushedControlFramesTestDataChunkedInputEmitsEmptyEndStreamTestDataChunkedInputSplitsByteBufIntoDataFramesTestDataCompressingInputStreamsHTTP2DataFramesTestDecompressorDecodesGzipDataFrameTestEncodeDecodeHTTP2SettingsHeaderTestFrameDecoderDecodesPayloadZeroCopyTestFrameEncoderCoalescesHeaderAndPayload
Direct Gnalloy dependencies for this module:
gnalloy.org/codec-compressiongnalloy.org/codec-http1gnalloy.org/gnalloy
Assembly guidance:
- Use this codec above a byte-oriented or datagram transport and below application handlers.
- The codec converts bytes or Gnalloy messages into protocol objects and converts outbound protocol objects back to bytes.
- It does not open sockets, own EventLoops, or define application lifecycle.
For sustained load, wire this module into a scenario under gnalloy.org/benchmarks or a runnable client under gnalloy.org/examples when the module participates in network traffic. Record host, OS, CPU, Go version, protocol, payload, concurrency, warmup, repetitions, throughput, and p99 latency in the report.