routes

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HTTP   = pool.New[HTTPRoute]("http_routes")
	Stream = pool.New[StreamRoute]("stream_routes")
)

Functions

func ByAlias added in v0.11.0

func ByAlias(typeFilter ...route.RouteType) map[string]Route

func Clear added in v0.11.0

func Clear()

func HealthInfo added in v0.11.0

func HealthInfo() map[string]*HealthInfoRaw

func HealthMap added in v0.11.0

func HealthMap() map[string]map[string]string

func HomepageCategories added in v0.11.0

func HomepageCategories() []string

func HomepageConfig added in v0.11.0

func HomepageConfig(categoryFilter, providerFilter string) homepage.Homepage

func Iter added in v0.11.0

func Iter(yield func(alias string, r Route) bool)

func NumRoutes added in v0.10.0

func NumRoutes() int

Types

type HTTPRoute added in v0.11.0

type HTTPRoute interface {
	Route
	http.Handler
}

func GetHTTPRouteOrExact

func GetHTTPRouteOrExact(alias, host string) (HTTPRoute, bool)

type HealthInfoRaw added in v0.11.0

type HealthInfoRaw struct {
	Status  health.Status `json:"status"`
	Latency time.Duration `json:"latency"`
}

func (*HealthInfoRaw) MarshalJSON added in v0.11.0

func (info *HealthInfoRaw) MarshalJSON() ([]byte, error)

func (*HealthInfoRaw) UnmarshalJSON added in v0.11.0

func (info *HealthInfoRaw) UnmarshalJSON(data []byte) error

type ReverseProxyRoute added in v0.11.0

type ReverseProxyRoute interface {
	HTTPRoute
	ReverseProxy() *reverseproxy.ReverseProxy
}

type Route added in v0.11.0

type Route interface {
	task.TaskStarter
	task.TaskFinisher
	pool.Object
	ProviderName() string
	TargetURL() *net.URL
	HealthMonitor() health.HealthMonitor
	Reference() string

	Started() bool

	IdlewatcherConfig() *idlewatcher.Config
	HealthCheckConfig() *health.HealthCheckConfig
	LoadBalanceConfig() *loadbalance.Config
	HomepageConfig() *homepage.ItemConfig
	HomepageItem() *homepage.Item
	ContainerInfo() *docker.Container

	Agent() *agent.AgentConfig

	IsDocker() bool
	IsAgent() bool
	UseLoadBalance() bool
	UseIdleWatcher() bool
	UseHealthCheck() bool
	UseAccessLog() bool
}

func Get added in v0.11.0

func Get(alias string) (Route, bool)

type StreamRoute added in v0.11.0

type StreamRoute interface {
	Route
	net.Stream
}

Jump to

Keyboard shortcuts

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