Documentation
¶
Index ¶
- Constants
- Variables
- func NewStreamRoute(base *Route) (routes.Route, gperr.Error)
- type FileServer
- type Metadata
- type ReveseProxyRoute
- type Route
- func (r *Route) Agent() *agent.AgentConfig
- func (r *Route) ContainerInfo() *docker.Container
- func (r *Route) Finalize()
- func (r *Route) FinalizeHomepageConfig()
- func (r *Route) Finish(reason any)
- func (r *Route) HealthCheckConfig() *health.HealthCheckConfig
- func (r *Route) HealthMonitor() health.HealthMonitor
- func (r *Route) HomepageConfig() *homepage.ItemConfig
- func (r *Route) HomepageItem() *homepage.Item
- func (r *Route) IdlewatcherConfig() *idlewatcher.Config
- func (r *Route) IsAgent() bool
- func (r *Route) IsDocker() bool
- func (r *Route) IsZeroPort() bool
- func (r *Route) Key() string
- func (r *Route) LoadBalanceConfig() *loadbalance.Config
- func (r *Route) Name() string
- func (r *Route) ProviderName() string
- func (r *Route) Reference() string
- func (r *Route) ShouldExclude() bool
- func (r *Route) Start(parent task.Parent) (err gperr.Error)
- func (r *Route) Started() bool
- func (r *Route) TargetURL() *net.URL
- func (r *Route) Type() route.RouteType
- func (r *Route) UseAccessLog() bool
- func (r *Route) UseHealthCheck() bool
- func (r *Route) UseIdleWatcher() bool
- func (r *Route) UseLoadBalance() bool
- func (r *Route) Validate() gperr.Error
- type Routes
- type Stream
- type StreamRoute
- type UDPBuf
- type UDPConn
- type UDPForwarder
Constants ¶
View Source
const DefaultHost = "localhost"
Variables ¶
View Source
var ( ImageNamePortMapTCP = map[string]int{ "mssql": 1433, "mysql": 3306, "mariadb": 3306, "postgres": 5432, "rabbitmq": 5672, "redis": 6379, "memcached": 11211, "mongo": 27017, "minecraft-server": 25565, } ImageNamePortMapHTTP = map[string]int{ "adguardhome": 3000, "bazarr": 6767, "calibre-web": 8083, "changedetection.io": 3000, "dockge": 5001, "gitea": 3000, "gogs": 3000, "grafana": 3000, "home-assistant": 8123, "homebridge": 8581, "httpd": 80, "immich": 3001, "jellyfin": 8096, "lidarr": 8686, "microbin": 8080, "nginx": 80, "nginx-proxy-manager": 81, "open-webui": 8080, "plex": 32400, "prometheus": 9090, "prowlarr": 9696, "radarr": 7878, "radarr-sma": 7878, "rsshub": 1200, "rss-bridge": 80, "sonarr": 8989, "sonarr-sma": 8989, "uptime-kuma": 3001, "whisparr": 6969, } ImageNamePortMapHTTPS = map[string]int{ "portainer-be": 9443, "portainer-ce": 9443, } AliasPortMapHTTP = map[string]int{} AliasPortMapHTTPS = map[string]int{ "portainer": 9443, "crafty": 8080, } )
Functions ¶
Types ¶
type FileServer ¶
type FileServer struct { *Route Health *monitor.FileServerHealthMonitor `json:"health"` // contains filtered or unexported fields }
func NewFileServer ¶
func NewFileServer(base *Route) (*FileServer, gperr.Error)
func (*FileServer) Finish ¶
func (s *FileServer) Finish(reason any)
Finish implements task.TaskFinisher.
func (*FileServer) HealthMonitor ¶
func (s *FileServer) HealthMonitor() health.HealthMonitor
func (*FileServer) ServeHTTP ¶
func (s *FileServer) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler.
func (*FileServer) Start ¶
func (s *FileServer) Start(parent task.Parent) gperr.Error
Start implements task.TaskStarter.
func (*FileServer) Task ¶
func (s *FileServer) Task() *task.Task
type ReveseProxyRoute ¶
type ReveseProxyRoute struct { *Route HealthMon health.HealthMonitor `json:"health,omitempty"` // contains filtered or unexported fields }
func NewReverseProxyRoute ¶
func NewReverseProxyRoute(base *Route) (*ReveseProxyRoute, gperr.Error)
func (*ReveseProxyRoute) Finish ¶
func (r *ReveseProxyRoute) Finish(reason any)
Finish implements task.TaskFinisher.
func (*ReveseProxyRoute) HealthMonitor ¶
func (r *ReveseProxyRoute) HealthMonitor() health.HealthMonitor
func (*ReveseProxyRoute) ServeHTTP ¶
func (r *ReveseProxyRoute) ServeHTTP(w http.ResponseWriter, req *http.Request)
func (*ReveseProxyRoute) Start ¶
func (r *ReveseProxyRoute) Start(parent task.Parent) gperr.Error
Start implements task.TaskStarter.
func (*ReveseProxyRoute) Task ¶
func (r *ReveseProxyRoute) Task() *task.Task
Task implements task.TaskStarter.
type Route ¶
type Route struct { Alias string `json:"alias"` Scheme route.Scheme `json:"scheme,omitempty"` Host string `json:"host,omitempty"` Port route.Port `json:"port,omitempty"` Root string `json:"root,omitempty"` route.HTTPConfig PathPatterns []string `json:"path_patterns,omitempty"` Rules rules.Rules `json:"rules,omitempty" validate:"omitempty,unique=Name"` HealthCheck *health.HealthCheckConfig `json:"healthcheck,omitempty"` LoadBalance *loadbalance.Config `json:"load_balance,omitempty"` Middlewares map[string]docker.LabelMap `json:"middlewares,omitempty"` Homepage *homepage.ItemConfig `json:"homepage,omitempty"` AccessLog *accesslog.RequestLoggerConfig `json:"access_log,omitempty"` Idlewatcher *idlewatcher.Config `json:"idlewatcher,omitempty"` Metadata `deserialize:"-"` // contains filtered or unexported fields }
func (*Route) Agent ¶ added in v0.10.0
func (r *Route) Agent() *agent.AgentConfig
func (*Route) ContainerInfo ¶
func (*Route) FinalizeHomepageConfig ¶ added in v0.10.0
func (r *Route) FinalizeHomepageConfig()
func (*Route) HealthCheckConfig ¶
func (r *Route) HealthCheckConfig() *health.HealthCheckConfig
func (*Route) HealthMonitor ¶
func (r *Route) HealthMonitor() health.HealthMonitor
func (*Route) HomepageConfig ¶
func (r *Route) HomepageConfig() *homepage.ItemConfig
func (*Route) HomepageItem ¶ added in v0.10.0
func (*Route) IdlewatcherConfig ¶
func (r *Route) IdlewatcherConfig() *idlewatcher.Config
func (*Route) IsZeroPort ¶
func (*Route) LoadBalanceConfig ¶
func (r *Route) LoadBalanceConfig() *loadbalance.Config
func (*Route) ProviderName ¶
func (*Route) ShouldExclude ¶
func (*Route) UseAccessLog ¶
func (*Route) UseHealthCheck ¶
func (*Route) UseIdleWatcher ¶
func (*Route) UseLoadBalance ¶
type Stream ¶
type Stream struct { *StreamRoute // contains filtered or unexported fields }
func NewStream ¶
func NewStream(base *StreamRoute) *Stream
type StreamRoute ¶
type StreamRoute struct { *Route net.Stream `json:"-"` HealthMon health.HealthMonitor `json:"health"` // contains filtered or unexported fields }
TODO: support stream load balance.
func (*StreamRoute) Finish ¶
func (r *StreamRoute) Finish(reason any)
Finish implements task.TaskFinisher.
func (*StreamRoute) HealthMonitor ¶
func (r *StreamRoute) HealthMonitor() health.HealthMonitor
func (*StreamRoute) Start ¶
func (r *StreamRoute) Start(parent task.Parent) gperr.Error
Start implements task.TaskStarter.
func (*StreamRoute) Task ¶
func (r *StreamRoute) Task() *task.Task
Task implements task.TaskStarter.
type UDPConn ¶
type UDPConn struct {
// contains filtered or unexported fields
}
func (*UDPConn) DstAddrString ¶
type UDPForwarder ¶
type UDPForwarder struct {
// contains filtered or unexported fields
}
func NewUDPForwarder ¶
func (*UDPForwarder) Accept ¶
func (w *UDPForwarder) Accept() (types.StreamConn, error)
func (*UDPForwarder) Addr ¶
func (w *UDPForwarder) Addr() net.Addr
func (*UDPForwarder) Close ¶
func (w *UDPForwarder) Close() error
func (*UDPForwarder) Handle ¶
func (w *UDPForwarder) Handle(streamConn types.StreamConn) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.