Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.38 KB

File metadata and controls

56 lines (42 loc) · 2.38 KB

Usage

简体中文 | Docs Index

Requirements

  • Go 1.25 or newer, matching the module go directive.
  • A Gnalloy application, recipe, example, or benchmark harness that owns lifecycle and deployment configuration.
  • Standalone module verification should set GOWORK=off so the module is tested through its published dependency graph.

Install

go get gnalloy.org/codec-http3@dev

Import

import "gnalloy.org/codec-http3"

Integration Pattern

  • Frame, header, body, and decoded-content limits must be selected from the trusted boundary of the service.
  • Streaming or chunked modes should be used for large payloads instead of materializing unbounded bodies.
  • Compression modules must set decoded-size limits to defend against expansion attacks.
  • ByteBuf ownership follows Gnalloy message rules: release only after the current component consumes the message.
  • QUIC and HTTP/3 paths require TLS 1.3 and a valid ALPN such as h3, doq, or the WebTransport profile in use.

API Selection

Use the API inventory to choose the exact constructor or option type for your protocol path:

go doc gnalloy.org/codec-http3

Common current entry points:

  • const DefaultMaxFrameSize = 16 * 1024 * 1024 ...
  • const HandlerNameHTTP3FrameDecoder = "http3-frame-decoder" ...
  • const SettingQPACKMaxTableCapacity uint64 = 0x01 ...
  • const SettingEnableConnectProtocol uint64 = 0x08 ...
  • const WebTransportProtocolH3 = "webtransport-h3" ...
  • var ErrInvalidFrame = errors.New("http3: invalid frame") ...
  • type HeaderCodecConfig struct{ ... }
  • type PipelineConfig struct{ ... }
  • type QPACKDynamicStateConfig struct{ ... }
  • type StateManagerConfig struct{ ... }
  • var ErrInvalidHeadersBlock = errors.New("gnalloy/codec/http3/http1bridge: invalid headers block")
  • type Config struct{ ... }

Cross-Module Assembly

When multiple Gnalloy repositories are developed together, create a local go.work file in your chosen workspace. Keep application-local replace directives out of published library modules unless the change is intentionally temporary and never committed.

Error Handling

Network input, peer behavior, platform capability, and timeout failures must be handled as normal errors. Do not recover protocol correctness by panicking. Return or propagate the module error and close the affected Channel when ownership requires it.