router

package
v0.0.0-...-ff54a84 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoutingError

type RoutingError struct {
	Error      error
	StatusCode int
}

RoutingError represents an error during routing along with an HTTP status code.

type RoutingTable

type RoutingTable struct {
	Ingresses       *v1.IngressList
	TlsCertificates map[string]*tls.Certificate
	IngressLimiters []*limiter.Limiter
}

RoutingTable represents the routing information for the application.

func (*RoutingTable) GetBackend

func (r *RoutingTable) GetBackend(host, uri, ip string) (*url.URL, map[string]string, RoutingError)

GetBackend retrieves the backend URL based on host and URI.

func (*RoutingTable) GetTlsCertificate

func (r *RoutingTable) GetTlsCertificate(sni string) (*tls.Certificate, error)

GetTlsCertificate retrieves the TLS certificate for the given SNI.

func (*RoutingTable) Update

func (r *RoutingTable) Update(payload watcher.Payload)

Update updates the routing table with new payload.

Jump to

Keyboard shortcuts

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