Add an exc_info parameter that optionally takes an
exception that is passed to the logging function. This
will log the traceback without an additional logging call.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The history component requires no specific configuration, is
generally always used, and has no dependencies that prevent
loading at startup. Convert history to a core component,
making it eligible for lookup/use in optional components.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This folder contains miscellaneous files used by Moonraker
or other applications in the Klipper ecosystem.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It is possible that older versions of Moonraker's update_manager
will fail in its attempt to update python packages. This can lead
to missing modules when the new version of Moonraker is loaded.
When a `ModuleNotFound` error is received during a call to
"load_component" Moonraker will attempt to install its
missing dependencies.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Clear the API cache when closing to purge stale callbacks. In addition,
explicitly delte the server object after the eventloop stops.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This change refactors the APIDefiniton into a dataclass, allowing
defs to be shared directly among HTTP and RPC requests. In
addition, all transports now share one instance of JSONRPC,
removing duplicate registration. API Defintiions are registered
with the RPC Dispatcher, and it validates the Transport type.
In addition tranports may perform their own validation prior
to request execution.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Refactor endpoint registration to reduce duplicated code.
Rename some APIDefinition attributes for clarity.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Create a websocket endpoint that allows clients identified as
agents to register remote methods with Klipper.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Allow all command line arguments to be specificed as an
environment variable. If both the command line argument
and environment variable is present the command line argument
takes precedence.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add a command line option that allows the installation to specify
the exact path to Moonraker's unix domain server socket. The
default location remains at:
<data_path>/comms/moonraker.sock
Signed-off-by: Eric Callahan <arksine.code@gmail.com>