Crate dynalock [] [src]

Dynalock: A lease based distributed lock.

Dynalock algorithm supports lease based distributed locking implementations through providers that support a strongly consistent Compare-And-Swap (CAS) operation, or at least the compare-and-set variant and an eventually consistent read operation. For algorithmic details please refer to the README.md file.

You can use this library to cooperatively synchronize access on a conceptual resource (e.g., pushing an item to a queue). The main data structure we use to describe the lock is DistLock.

The generic structure DistLock accepts a single type parameter Driver to delegate the implementation of the Locking trait to back-end or storage driver implementations. As an example, the DynamoDB driver implements the Locking trait for DistLock<DynamoDbDriver>. The Locking trait is an API contract where driver implementations will implement the Dynalock algorithm for using the provider's primitives.

Re-exports

pub extern crate rusoto_core;
pub extern crate rusoto_dynamodb;
pub use error::DynaError;
pub use error::DynaErrorKind;
pub use providers::*;

Modules

error

Dynalock error type and kinds.

providers

Distributed lock storage providers.

Structs

DistLock

The distributed lock structure that holds all the internal lock state and information.

Traits

Locking

The Locking trait provides a contractual API that providers implement the Dynalock algorithm using the particular provider's primitives.