Skip to main content

run

Function run 

Source
pub async fn run(config: AgentDaemonConfig) -> Result<(), GitwayError>
Expand description

Runs the agent daemon until a termination signal arrives.

§Errors

Returns GitwayError if the socket cannot be bound, the pid file cannot be written, or the accept loop returns with an error.

§Termination

On SIGTERM or SIGINT the function returns Ok(()) after unlinking the socket and removing the pid file. Every stored key is zeroed as the KeyStore drops.