edge

package
v1.801.490 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package edge holds the transport ceilings of a PUBLIC HTTP edge.

It exists because TWO processes are one edge and each was configured separately. cmd/cloud is the front door every request reaches first; the program behind it is built by cloud.App(). App() read these off Config and the door read nothing, so the door enforced the framework defaults — 4 KiB headers and 4 MiB bodies — and no setting downstream could be reached past it. GATEWAY_BODY_LIMIT was set to 100 MiB in the pod's environment and 4,194,305 bytes still answered 400: the value was declared, and the process that decides had never read it.

That also means the 16 MiB default had never taken effect. It exists so a 1M-token prompt (~4.3 MB of JSON) can reach the 1M-context models; at the framework's 4 MiB those models were unreachable, and the wire error is the opaque 400 "Error when parsing request", which reads like a malformed payload rather than a size cap.

This package is a LEAF on purpose. The door links zip, manifest and webui and nothing else — importing the cloud root to reach a number would re-fuse the monolith the door was built to replace. Anything that terminates public HTTP calls these; there is no second place to write the number down, because a second place is how this broke.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BodyLimit

func BodyLimit() int

BodyLimit is the maximum request body a public edge accepts, in bytes. Env GATEWAY_BODY_LIMIT.

func ReadBufferSize

func ReadBufferSize() int

ReadBufferSize is the header ceiling. Above fiber's 4 KiB default so a multi-domain SSO session (Domain=.hanzo.ai cookies on every subdomain) does not 431 at the public edge. Env GATEWAY_READ_BUFFER_SIZE.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL