include "sys.m"; include "styxpersist.m"; styxpersist := load Styxpersist Styxpersist->PATH; init: fn(clientfd: ref Sys->FD, usefac: int, keyspec: string): (chan of chan of ref Sys->FD, string);
Init returns a tuple, say (c, err). If things have started successfully, c holds a channel that styxpersist uses to request a new connection to the server. The caller of init should arrange that a process is ready to repeatedly receive on this channel, dial the server, and send the resulting file descriptor (or nil if the connection was unsuccessful) on the channel received,
If init failed, c will be nil and err describes the error.
If the server goes down, it redials as above, and tries to re-open all the files that were open in the previous connection. In the meantime all client access to the namespace is blocked.
Note that this service should only be used on conventional file servers, where most reads and writes are idempotent.
Styxpersist is dependent on the capabilities of the local factotum to re-authenticate Plan 9 style. If a client uses an external factotum with different keys, styxpersist may be unable to re-authenticate.
STYXPERSIST(2 ) | Rev: Tue Mar 31 02:42:38 GMT 2015 |