This commit moves the mix.exs, mix.lock and priv directors that were
inside app/ to the root directory. Configuration tweaks with paths were
done for the asset building.
The priv/ directory had to be moved because mix by default symlinks it
inside the build output, and I couldn't find a configuration option to
have it live inside app/
This commit add nix support for development shells. The developer can
use `nix develop` to setup a complete and reproducable devleopment
environment using Nix.
Some work has been done on making the Connection feel nicer, but also
more work is needed to not have the channel be exposed to the upper
layers of the application. We should wrap all the GRPC calls in the
GenServer (which may also allow caching on certain calls such as
get_sys_info)
Dynamically supervise a GRPC connection and keep it alive for a while,
using a timeout to kill the process on inactivity.
The Connection GenServer keeps the connection alive, while listening to
a health stream from the GRPC endpoint, notifying any subscribed
listeners about changes to health.
This health is then propagated to the main servers page.
Also create a looping get_sys_info which retrieves some basic system
information.
`Prymn.Agent.Connection` GenServer uses healthchecking with the new
streaming RPC, retrieving asynchronously the health status of the agent.
The Connection will also shut itself down when there's no usage (when
the keepalive function is not called frequently)
Adds a health checking endpoint on the GRPC server. This is a stream that changes whenever a health status update occurs.
Reviewed-on: https://git.nikos.gg/prymn/prymn/pulls/5
Co-authored-by: Nikos Papadakis <nikos@papadakis.xyz>
Co-committed-by: Nikos Papadakis <nikos@papadakis.xyz>