[][src]Crate namaste

Namaste

Project

Features

Handling locks amongst processes.

Design

Identifier

An identifier - ID - is a 64-byte array, which matches an SHA3-512 hash.

Namaste can be used to lock an ID.

  • On Linux, it uses abstract sockets (see unix(7)).
  • On other Unix systems, it uses file locks.

Frequently Answered Questions

Why not Unix Domain Socket?

UDS has a good design, but its implementation has some serious flaws:

  • Already-bound file path can be deleted. Any new binding to that path will silently take control of current one.

Why file locks?

Files can still be deleted even when locked. But, that's the only way that other systems support.

Other notes

To generate an ID, you can get help from Dia-Hammer:

$ hammer sha3-512 --limit=65536 --format=hex-array -- /dev/urandom

To generate a handshake ID, you can use tiny-keccak.

Modules

version_info

0.15.2 (August 12th, 2019)

Structs

Namaste

Namaste

Constants

CODE_NAME

Crate code name

ID

ID of this crate

NAME

Crate name

RELEASE_DATE

Crate release date (year/month/day)

TAG

Tag, which can be used for logging...

VERSION

Crate version

Type Definitions

Id

Identifier

Result

Result type used in this crate