Help us shape the future of Go! Take the 2026 Go Developer Survey

endpoint

package
v0.4.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPPortScheme

func HTTPPortScheme(targetPort, publishedPort int) (string, bool)

func IsLoopbackHost

func IsLoopbackHost(host string) bool

func NormalizePublishedHost

func NormalizePublishedHost(host string) string

func SortExposureStatuses

func SortExposureStatuses(values []ExposureStatus)

Types

type Endpoint

type Endpoint struct {
	Service string `json:"service"`
	Scheme  string `json:"scheme"`
	Host    string `json:"host"`
	Port    int    `json:"port"`
}

Endpoint is a stable logical service endpoint. Logical identity is independent from runtime-generated container or pod names.

func (Endpoint) Validate

func (e Endpoint) Validate() error

type ExposureStatus

type ExposureStatus struct {
	Service string `json:"service"`
	Scheme  string `json:"scheme"`
	Host    string `json:"host"`
	Port    int    `json:"port"`
	Ready   bool   `json:"ready"`
	Detail  string `json:"detail,omitempty"`
}

ExposureStatus is machine-readable readiness for one observed or managed HTTP exposure.

func ProbeHTTP

func ProbeHTTP(ctx context.Context, ep Endpoint) ExposureStatus

func ProbeHTTPDialTarget

func ProbeHTTPDialTarget(ctx context.Context, logical Endpoint, dialHost string, dialPort int) ExposureStatus

ProbeHTTPDialTarget verifies a logical HTTP endpoint while dialing a separate local/runtime address. This supports hostname-bound TLS without conflating endpoint identity with runtime placement.

Jump to

Keyboard shortcuts

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