ingress

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 1 Imported by: 1 module, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ingress defines the Ingress interface for hostname-based tunnel routing. It maps incoming hostnames to tunnel endpoints, enabling reverse proxy scenarios where external traffic is routed to internal services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ingress

type Ingress interface {
	// SetRule adds or updates a routing rule.
	SetRule(ctx context.Context, rule *Rule, opts ...Option) bool
	// GetRule queries a routing rule by hostname.
	GetRule(ctx context.Context, host string, opts ...Option) *Rule
}

Ingress manages hostname-to-endpoint routing rules for incoming traffic. It maps domain names to tunnel endpoints, enabling multi-tenant reverse proxy setups where different hostnames are serviced by different backends.

type Option

type Option func(opts *Options)

Option is a functional option for configuring Options.

func WithService added in v0.6.1

func WithService(service string) Option

WithService sets the service name.

type Options

type Options struct {
	// Service is the service name this ingress rule belongs to.
	Service string
}

Options holds the initialization parameters for an Ingress.

type Rule

type Rule struct {
	// Hostname is the hostname match pattern, e.g. "example.com",
	// "*.example.org", or ".example.com".
	Hostname string
	// Endpoint is the tunnel ID that traffic for the matching hostname
	// should be routed to.
	Endpoint string
}

Rule defines a mapping from a hostname pattern to a tunnel endpoint.

Jump to

Keyboard shortcuts

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