Documentation
¶
Overview ¶
Package mach provides silicon-speed protocol engines and transport layers for Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface {
io.Closer
// OpenStream creates a new request-response stream (Zero-alloc where possible).
OpenStream(ctx context.Context) (Stream, error)
}
Conn represents an active protocol connection. For multiplexed protocols (H2, H3), it manages multiple Streams. For H1, it acts as a single-stream carrier.
type Engine ¶
type Engine interface {
// Dial establishes a connection or yields a protocol-specific multiplexer.
Dial(ctx context.Context, addr string) (Conn, error)
}
Engine defines the universal contract for protocol engines (H1/H2/H3/QUIC). It acts as a factory for protocol connections.
type Frame ¶
type Frame interface {
// Type returns the protocol-specific frame type identifier.
Type() uint8
// Payload yields the zero-copy slice of the frame body.
Payload() []byte
}
Frame represents a Data-In-Motion abstraction of a protocol frame (H2/H3/QUIC).
type Stream ¶
type Stream interface {
io.Reader
io.Writer
io.Closer
// ReadFrame parses the next protocol-specific frame without heap allocations.
ReadFrame() (Frame, error)
}
Stream represents an isolated request/response lifecycle. It bypasses standard io.Reader/io.Writer allocations by using Zero-copy methods or integrating directly with the foundation/bufkit arenas.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package client provides high-performance client transport engines, connection pooling, and multi-protocol session abstractions across HTTP/1.1, HTTP/2, and HTTP/3.
|
Package client provides high-performance client transport engines, connection pooling, and multi-protocol session abstractions across HTTP/1.1, HTTP/2, and HTTP/3. |
|
h1
Package h1 provides an HTTP/1.1 client protocol implementation featuring asymmetric isolation.
|
Package h1 provides an HTTP/1.1 client protocol implementation featuring asymmetric isolation. |
|
h2
Package h2 provides an HTTP/2 client protocol implementation featuring asymmetric isolation.
|
Package h2 provides an HTTP/2 client protocol implementation featuring asymmetric isolation. |
|
h3
Package h3 provides an HTTP/3 client protocol implementation featuring asymmetric isolation.
|
Package h3 provides an HTTP/3 client protocol implementation featuring asymmetric isolation. |
|
fsm
|
|
|
h2
Package h2 provides a finite state machine for HTTP/2 connections.
|
Package h2 provides a finite state machine for HTTP/2 connections. |
|
Package hpack provides HTTP/2 header compression (RFC 7541).
|
Package hpack provides HTTP/2 header compression (RFC 7541). |
|
proto
|
|
|
adaptive
Package adaptive provides an adaptive read buffer sizing strategy with hysteresis decay.
|
Package adaptive provides an adaptive read buffer sizing strategy with hysteresis decay. |
|
cachestatus
Package cachestatus implements the Cache-Status HTTP Response Header Field strictly conforming to RFC 9211.
|
Package cachestatus implements the Cache-Status HTTP Response Header Field strictly conforming to RFC 9211. |
|
compress
Package compress provides HTTP compression algorithms.
|
Package compress provides HTTP compression algorithms. |
|
dns/svcb
Package svcb implements Service Binding (SVCB) and HTTPS Resource Records strictly conforming to RFC 9460.
|
Package svcb implements Service Binding (SVCB) and HTTPS Resource Records strictly conforming to RFC 9460. |
|
dns/wire
Package wire provides low-level utilities, constants, encoders, and decoders for standard RFC 1035, RFC 2181, RFC 3596, RFC 6891, and RFC 9460 DNS wire messages.
|
Package wire provides low-level utilities, constants, encoders, and decoders for standard RFC 1035, RFC 2181, RFC 3596, RFC 6891, and RFC 9460 DNS wire messages. |
|
grpcweb
Package grpcweb implements gRPC-Web wire framing and trailer validation strictly conforming to the gRPC-Web protocol specification.
|
Package grpcweb implements gRPC-Web wire framing and trailer validation strictly conforming to the gRPC-Web protocol specification. |
|
h2
Package h2 provides HTTP/2 frame parsing and encoding.
|
Package h2 provides HTTP/2 frame parsing and encoding. |
|
h3
Package h3 provides HTTP/3 frame parsing and encoding.
|
Package h3 provides HTTP/3 frame parsing and encoding. |
|
headkit
Package headkit provides a zero-allocation, high-performance HTTP header, directive, content-negotiation, and MIME media-type toolkit for Go.
|
Package headkit provides a zero-allocation, high-performance HTTP header, directive, content-negotiation, and MIME media-type toolkit for Go. |
|
http
Package http provides HTTP/1.x parsing and encoding.
|
Package http provides HTTP/1.x parsing and encoding. |
|
http/auth
Package auth implements HTTP Authentication schemes strictly conforming to IETF standards (RFC 7617 Basic, RFC 6750 Bearer).
|
Package auth implements HTTP Authentication schemes strictly conforming to IETF standards (RFC 7617 Basic, RFC 6750 Bearer). |
|
http/contentdisposition
Package contentdisposition implements Content-Disposition header parsing, RFC 8187 parameter encoding/decoding, and safe filename sanitization strictly conforming to RFC 6266 and RFC 8187.
|
Package contentdisposition implements Content-Disposition header parsing, RFC 8187 parameter encoding/decoding, and safe filename sanitization strictly conforming to RFC 6266 and RFC 8187. |
|
http/digest
Package digest implements RFC 7616 and RFC 2617 Digest Access Authentication for HTTP transactions.
|
Package digest implements RFC 7616 and RFC 2617 Digest Access Authentication for HTTP transactions. |
|
http/etag
Package etag implements RFC 7232, RFC 9110, and RFC 9111 HTTP Entity Tags, conditional request matching, and 304 response reconstruction.
|
Package etag implements RFC 7232, RFC 9110, and RFC 9111 HTTP Entity Tags, conditional request matching, and 304 response reconstruction. |
|
http/header
Package header provides official, canonical HTTP header names, pseudo-headers, MIME media types, HTTP methods, and common header values conforming strictly to IANA registry, RFC 9110, RFC 9111, RFC 9112, RFC 7540, RFC 9113, RFC 9114, RFC 8441, RFC 9220, RFC 9449, W3C Fetch Metadata, and W3C Trace Context.
|
Package header provides official, canonical HTTP header names, pseudo-headers, MIME media types, HTTP methods, and common header values conforming strictly to IANA registry, RFC 9110, RFC 9111, RFC 9112, RFC 7540, RFC 9113, RFC 9114, RFC 8441, RFC 9220, RFC 9449, W3C Fetch Metadata, and W3C Trace Context. |
|
http/hpkp
Package hpkp implements the Public Key Pinning Extension for HTTP strictly conforming to RFC 7469.
|
Package hpkp implements the Public Key Pinning Extension for HTTP strictly conforming to RFC 7469. |
|
http/priority
Package priority implements RFC 9218 Extensible Priorities for HTTP/2, HTTP/3, and HTTP/1.1 aligning request resource scheduling with modern Chromium architecture.
|
Package priority implements RFC 9218 Extensible Priorities for HTTP/2, HTTP/3, and HTTP/1.1 aligning request resource scheduling with modern Chromium architecture. |
|
http/rodata
Package rodata provides static read-only byte slices stored in the binary's .rodata segment for zero-allocation HTTP header framing, parsing, and interning.
|
Package rodata provides static read-only byte slices stored in the binary's .rodata segment for zero-allocation HTTP header framing, parsing, and interning. |
|
http/status
Package status defines HTTP status codes, reason phrases, and optimized byte slice lookup helpers.
|
Package status defines HTTP status codes, reason phrases, and optimized byte slice lookup helpers. |
|
http/zerocopy
Package zerocopy provides utilities for zero-copy HTTP requests and responses.
|
Package zerocopy provides utilities for zero-copy HTTP requests and responses. |
|
packet
Package packet provides low-level network packet primitives and Internet checksum calculations (RFC 1071, RFC 4443).
|
Package packet provides low-level network packet primitives and Internet checksum calculations (RFC 1071, RFC 4443). |
|
packet/icmp
Package icmp implements ICMPv4 and ICMPv6 packet construction and MTU signaling (RFC 792, RFC 4443, RFC 1191, RFC 4884).
|
Package icmp implements ICMPv4 and ICMPv6 packet construction and MTU signaling (RFC 792, RFC 4443, RFC 1191, RFC 4884). |
|
packet/tcp
Package tcp provides TCP header manipulation and MSS clamping utilities (RFC 9293, RFC 879).
|
Package tcp provides TCP header manipulation and MSS clamping utilities (RFC 9293, RFC 879). |
|
sse
Package sse implements the WHATWG HTML Living Standard Server-Sent Events (SSE) protocol (formerly W3C).
|
Package sse implements the WHATWG HTML Living Standard Server-Sent Events (SSE) protocol (formerly W3C). |
|
vectored
Package vectored provides zero-copy buffer queues for scatter-gather network and disk I/O.
|
Package vectored provides zero-copy buffer queues for scatter-gather network and disk I/O. |
|
weblink
Package weblink implements Web Linking and Link HTTP header serialization strictly conforming to RFC 8288 (obsoletes RFC 5988).
|
Package weblink implements Web Linking and Link HTTP header serialization strictly conforming to RFC 8288 (obsoletes RFC 5988). |
|
Package qpack provides HTTP/3 header compression (RFC 9204).
|
Package qpack provides HTTP/3 header compression (RFC 9204). |
|
server
|
|
|
h1
Package h1 provides a zero-allocation HTTP/1.1 server protocol engine.
|
Package h1 provides a zero-allocation HTTP/1.1 server protocol engine. |
|
h2
Package h2 provides a zero-allocation HTTP/2 server protocol engine.
|
Package h2 provides a zero-allocation HTTP/2 server protocol engine. |
|
h3
Package h3 provides a zero-allocation HTTP/3 server protocol engine.
|
Package h3 provides a zero-allocation HTTP/3 server protocol engine. |