instanceheader

package
v1.131.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package 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).

Index

Constants

View Source
const Header = "X-Platform-Instance"

Header is the response header that carries the process name.

Variables

This section is empty.

Functions

func HostName

func HostName(addr string) string

HostName is Name for this process.

func Middleware

func Middleware(name string, next http.Handler) http.Handler

Middleware sets Header on every response, before the handler runs, so a refusal written by any layer below carries it.

func Name

func Name(hostname, addr string) string

Name 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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