package
0.0.0-20230227000145-7f8d8f8780fe
Repository: https://github.com/neophenix/lxdepot.git
Documentation: pkg.go.dev
# Packages
Package ws is for our websocket handlers All the websocket handlers send 2 messages to the UI.
# Functions
AddRoute compiles the regex string and appends it to our route list with its handler func pointer.
ContainerHandler handles requests for /container/HOST:NAME.
ContainerHostListHandler handles requests for /containers/HOST.
ContainerListHandler handles requests for /containers.
FourOhFourHandler is our 404 response.
GetRouteHandler compares the path string to the route list and returns the handler pointer if found or nil.
HostListHandler handles requests for /hosts.
ImageListHandler handles requests for /images.
NewContainerHandler handles requests for /container/new.
RootHandler handles requests for everything, and then compares the requested URL to our array of routes, the first match wins and we call that handler.
# Variables
CacheTemplates is the setting on whether to cache the template files or read from disk each time.
Conf is our main config.
Routes is the array in the order we will attempt to match the route with the incoming url, first one wins.
WebRoot is the path to the web templates + static files.