Skip to content

Reference

Every setting, option, default and error this module exposes, one page per sub-package. The authoritative per-symbol API is pkg.go.dev; these pages add what godoc does not carry — the default value, what happens when a value is wrong, and which option is silently ignored on which call path.

  • HTTP serverServerSettings, the ServerOption and RegisterOption families, timeouts and body limits, health endpoints, auth middleware, security headers, SSE.
  • gRPC serverServerSettings, options, message-size limits, the health service, the auth interceptor, TLS credentials, DialLocal.
  • GatewaySettings, options, and what New and Register each own.
  • TLS settings — the gtls.Pair fields this module reads, mTLS modes, and which TLS option wins when two are supplied.

There is no configuration file and no environment variable

transport reads no config file, no environment variable and no command-line flag. Every setting on these pages is a Go struct field or a functional option that a caller passes in code.

The mapstructure / yaml / json struct tags on ServerSettings exist so a consumer can decode its own configuration into the struct. Nothing in this module does that decoding. In go-tool-base the *FromContainable adapters read the config container and build the settings; outside it, you build them yourself.

What is not documented here

Anything below the API surface: the exact cipher-suite list, the controls supervisor's ordering rules, and the transit middleware's own options. Those belong to go/tls, go/controls and go/transit and are documented there.

For what the module deliberately will not do at all, see What transport does not do.