{"modulePath":"github.com/txn2/mcp-data-platform","version":"v1.166.3","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package instanceheader\n\nPackage instanceheader names, on every HTTP response, the platform process that served it. Replicas of one deployment share a database and differ in the state each holds in memory, so a defect of that kind is visible only to a reader who can tell which replica answered (#1708).\n\n## Constants\n\n```go\nconst BuildHeader = \"X-Platform-Build\"\n```\nBuildHeader names the build that served a response (#2727): the version and commit buildinfo.Build reports. An open portal page compares it with the build it loaded and moves to a new one, so a fix that shipped reaches a page left open across the upgrade. Only an answer to a signed-in caller the portal's access gate admitted carries it (accessgate.Require): the build is not told to an anonymous caller, a site's visitor, an endpoint's caller or a share's reader.\n\n```go\nconst Header = \"X-Platform-Instance\"\n```\nHeader is the response header that carries the process name.\n\n## Functions\n\n```go\nfunc HostName(addr string) string\n```\nHostName is Name for this process.\n\n```go\nfunc Middleware(name string, next http.Handler) http.Handler\n```\nMiddleware sets Header on every response, before the handler runs, so a refusal written by any layer below carries it.\n\n```go\nfunc Name(hostname, addr string) string\n```\nName is the header value for a process listening on addr: the hostname, which separates pods, and the listen port, which separates two processes on one machine.\n\n","path":"github.com/txn2/mcp-data-platform/internal/httpserver/instanceheader","name":"instanceheader","synopsis":"Package instanceheader names, on every HTTP response, the platform process that served it.","isRedistributable":true}
