Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Enabled: false, Routes: []Route{}, }
DefaultConfig is the default configuration for Lite mode.
Functions ¶
This section is empty.
Types ¶
type Route ¶
type Route struct { Host configutil.SingleOrMulti[string] `json:"host" yaml:"host"` Backend configutil.SingleOrMulti[string] `json:"backend" yaml:"backend"` CachePingTTL configutil.Duration `json:"cachePingTTL,omitempty" yaml:"cachePingTTL,omitempty"` // 0 = default, < 0 = disabled Fallback *Status `json:"fallback,omitempty" yaml:"fallback,omitempty"` // nil = disabled ProxyProtocol bool `json:"proxyProtocol,omitempty" yaml:"proxyProtocol,omitempty"` RealIP bool `json:"realIP,omitempty" yaml:"realIP,omitempty"` ModifyVirtualHost bool `json:"modifyVirtualHost,omitempty" yaml:"modifyVirtualHost,omitempty"` }
func (*Route) CachePingEnabled ¶ added in v0.26.0
CachePingEnabled returns true if the route has a ping cache enabled.
func (*Route) GetCachePingTTL ¶ added in v0.26.0
GetCachePingTTL returns the configured ping cache TTL or a default duration if not set.
type Status ¶ added in v0.31.0
type Status struct { MOTD string `yaml:"motd,omitempty" json:"motd,omitempty"` Version ping.Version `yaml:"version,omitempty" json:"version,omitempty"` Favicon favicon.Favicon `yaml:"favicon,omitempty" json:"favicon,omitempty"` ModInfo modinfo.ModInfo `yaml:"modInfo,omitempty" json:"modInfo,omitempty"` ParsedMOTD struct { Text *component.Text `yaml:"-" json:"-"` sync.Once `yaml:"-" json:"-"` } `yaml:"-" json:"-"` }
Click to show internal directories.
Click to hide internal directories.