Crate spindle_rs

Source
Expand description

This crate implements distributed locking using Cloud Spanner. It relies on Spanner’s TrueTime and transactions support to achieve its locking mechanism. It’s a port of spindle.

One use case for this library is leader election. If you want one host/node/pod to be the leader within a cluster/group, you can achieve that with this library. When the leader fails, it will fail over to another host/node/pod within a specific timeout.

Structs§

Lock
Lock implements distributed locking using Spanner as backing storage and TrueTime as its source of global true time.
LockBuilder
LockBuilder builds an instance of Lock with default values.