probe

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package probe asks the proxy whether a routed service answers, without DNS: the request goes to 127.0.0.1 on the proxy's port with the stack's host in the Host header.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	// Header is the response header naming the service.
	Header string
}

HTTP probes over plain HTTP.

func (HTTP) Get

func (p HTTP) Get(ctx context.Context, addr, host, path string) (Response, error)

Get sends GET path with Host: host to addr (host:port) and follows no redirect.

type Response

type Response struct {
	Status int
	// Service is the value of the X-Siding-Service header, set only on the service's own
	// responses.
	Service string
}

Response is what the proxy answered.

func (Response) Answered

func (r Response) Answered(service string) bool

Answered reports whether the response came from service (<project>/<service>) itself and not from the proxy: it carries the service header and is not a gateway error.

Jump to

Keyboard shortcuts

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