app

package
v1.30.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	HostEnvVar      = "node"
	PodEnvVar       = "pod"
	NamespaceEnvVar = "namespace"
)
View Source
const (
	DefaultCertLifeSpan = 24 * time.Hour * 365
)

Variables

View Source
var (
	E = Env{}
)
View Source
var (
	F = struct {
		CertificateLifeSpan time.Duration
		HTTPPort            int
		HTTPSPort           int
	}{}
)

Functions

func RegisterFlags

func RegisterFlags()

RegisterFlags creates flags.

func RunHTTPServer

func RunHTTPServer(ctx context.Context)

RunHTTPServer runs HTTP and HTTPS goroutines and blocks.

Types

type Env

type Env struct {
	Node      string
	Pod       string
	Namespace string
}

type ResponseBody added in v1.6.0

type ResponseBody struct {
	Host          string              `json:"host"`
	Method        string              `json:"method"`
	URI           string              `json:"uri"`
	HTTPVersion   string              `json:"httpVersion"`
	Time          time.Time           `json:"time"`
	K8sEnv        Env                 `json:"k8sEnv"`
	RemoteAddr    string              `json:"remoteAddr"`
	TLS           bool                `json:"tls"`
	Header        map[string][]string `json:"header"`
	ServerVersion string              `json:"serverVersion"`
}

ResponseBody is the structure returned by the echo server.

Jump to

Keyboard shortcuts

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