How to implement your own custom activation server?
Using the arcana-base-server utility, you only have to write a struct and
three functions.
The struct is the state of the activation regarding a host. This struct should
be able to parse a uri (passed as an url::Url instance) to have enough
information to connect to the targeted host.
For example, please look at the arcana-nixos-server/src/host.rs file.
The three functions consists of handler of the requests coming from the arcana client:
apply_functionis the function which takes apply requests and process it.build_functionis the function which takes build requests and process it.copy_closure_functionis the function which takes copy closure requests and process it.
Signatures of the function should be:
pub async ;
pub async ;
pub async ;
where TargetHost is your struct defined earlier.
Functions takes the state and the request and push responses inside the tx
channel.
For more example, please take a look to the arcana-nixos-server.