Skip to main content

write_registration

Function write_registration 

Source
pub fn write_registration(root: &Path, reg: &RegistrationFile) -> Result<()>
Expand description

Publish reg as the registration for root, creating the runtime directory.

The digest is taken now, so a caller that has just bound should publish through SocketEndpoint::publish or bind with bind_socket_registered, which reuse the digest the bind resolved.

The file is replaced atomically, so a reader listing the directory never sees half a registration.