mkdir gnalloy-app && cd gnalloy-app
go mod init example.com/gnalloy-app
go get gnalloy.org/codec-http1@dev
go doc gnalloy.org/codec-http1The current source tree exposes these package import paths:
gnalloy.org/codec-http1gnalloy.org/codec-http1/cookiegnalloy.org/codec-http1/multipart
Use go doc against the package that matches the behavior you need:
go doc gnalloy.org/codec-http1
go doc gnalloy.org/codec-http1/cookie
go doc gnalloy.org/codec-http1/multipartSelected current exported entry points:
const DefaultMaxDecodedContentBytes = 16 << 20func AppendQueryString(dst []byte, path string, params []QueryParam) ([]byte, error)func IsSwitchingProtocolsResponse(resp Response, protocol string) boolfunc IsUpgradeRequest(req Request, protocol string) boolfunc NewContentEncodingInput(input codec.ChunkedInput, coding ContentCoding, cfg ContentEncodingInputConfig) (*compression.CompressingChunkedInput, error)type Chunk struct{ ... }var ErrInvalidCookie = errors.New("gnalloy/codec/http1/cookie: invalid cookie") ...func AppendCookieHeader(dst []byte, cookies []Cookie) ([]byte, error)func AppendSetCookie(dst []byte, c Cookie) ([]byte, error)func EncodeCookieHeader(cookies []Cookie) (string, error)func EncodeSetCookie(c Cookie) (string, error)func SameSiteString(mode SameSite) (string, bool)var ErrInvalidContentType = errors.New("gnalloy/codec/http1/multipart: invalid content type") ...func ContentType(boundary string) (string, error)func FormDataHeader(name string, fileName string, contentType string) textproto.MIMEHeaderfunc ParseBoundary(contentType string) (string, error)func StreamRequest(req http1.Request, limits Limits, handler PartHandler) errortype Decoder 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:
BenchmarkFindHeaderEndFragmentedBenchmarkRequestDecoderChunkedFragmentedBodyBenchmarkRequestDecoderFragmentedHeaderBenchmarkRequestEncoderHeaderBenchmarkResponseEncoderHeaderBenchmarkStringSliceFragmentedFuzzHTTP1ObjectRequestDecoderFuzzHTTP1ObjectResponseDecoderFuzzHTTP1RequestDecoderFuzzHTTP1ResponseDecoderTestAppendQueryStringEncodesParamsInCallOrderTestChunkedBodyEncoderWritesStreamingChunksTestContentCompressorCompressesAcceptedResponseTestContentDecompressorDecodesGzipResponseTestContentEncodingInputStreamsHTTP1GzipBodyTestContinueHandlerWritesInterimResponseAndPropagatesRequestTestDecodeCookieHeaderParsesPairsTestDecodeQueryStringEnforcesParamLimit
Direct Gnalloy dependencies for this module:
gnalloy.org/codec-compressiongnalloy.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.