routing

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key added in v0.5.0

type Key []byte

func NewKey added in v0.5.0

func NewKey(hostname string, path string) Key

NewKey creates a routing key from hostname (without port) and path.

func NewKeyFromRequest added in v0.5.0

func NewKeyFromRequest(req *http.Request) Key

NewKeyFromRequest creates a routing key from an HTTP request.

func NewKeyFromURL added in v0.5.0

func NewKeyFromURL(url *url.URL) Key

NewKeyFromURL creates a routing key from a URL.

func (Key) String added in v0.5.0

func (k Key) String() string

type Keys added in v0.5.0

type Keys []Key

func NewKeysFromHTTPSO added in v0.5.0

func NewKeysFromHTTPSO(httpso *httpv1alpha1.HTTPScaledObject) Keys

NewKeysFromHTTPSO creates routing keys from an HTTPScaledObject.

type Table

type Table interface {
	util.HealthChecker

	Start(ctx context.Context) error
	Route(req *http.Request) *httpv1alpha1.HTTPScaledObject
	HasSynced() bool
}

func NewTable

func NewTable(sharedInformerFactory externalversions.SharedInformerFactory, namespace string, counter queue.Counter) (Table, error)

type TableMemory added in v0.5.0

type TableMemory struct {
	// contains filtered or unexported fields
}

TableMemory is an immutable routing table for HTTPScaledObjects.

func NewTableMemory added in v0.5.0

func NewTableMemory() *TableMemory

NewTableMemory creates an empty TableMemory.

func (*TableMemory) Remember added in v0.5.0

func (tm *TableMemory) Remember(httpso *httpv1alpha1.HTTPScaledObject) *TableMemory

Remember adds an HTTPScaledObject and returns a new TableMemory.

func (*TableMemory) Route added in v0.5.0

func (tm *TableMemory) Route(hostname, path string, headers http.Header) *httpv1alpha1.HTTPScaledObject

Route finds an HTTPScaledObject matching hostname, path and headers. Tries exact match first the hostname, then filter by headers and find the most specific match then it moves to wildcards with similar header matching rule, finally catch-all.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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