Discover Packages
github.com/peterldowns/localias
pkg
daemon
package
Version:
v0.0.0-...-fe5d709
Opens a new window with list of versions in this module.
Published: Apr 4, 2024
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Kill force-kills the daemon if it's running.
Reload requests that the running daemon reload and use the given config.
run is the logic that the daemon runs after it is forked. It will loop until
it receives a shutdown request, after which the function exits cleanly.
Start will fork and start the daemon process, which will start the caddy
server and the mdns server (if needed) to proxy routes based on the current
configuration. It also starts an RPC server that will handle requests to
reload the server with a new configuration or stop the servers and exit the
daemon.
Status will determine whether or not the daemon process is running. If
it is, it returns the non-nil os.Process of that daemon.
Stop requests that the running daemon exit cleanly and shut down.
This struct is used to register RPC commands via the `rpc` package. This
lets us send specific commands to a running daemon.
Reload will stop the existing server (both caddy and mdns) and then start
them up again with the new config.
Stop will use the global `close` channel to signal the existing server (both
caddy and mdns) to shut down cleanly.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.