UNPKG

@squidcloud/client

Version:

A typescript implementation of the Squid client

20 lines (19 loc) 562 B
import { Observable } from 'rxjs'; /** * A handler for a distributed lock that can be released. * @category Platform */ export interface DistributedLock { /** Releases the lock. */ release(): void; /** * Whether the lock has been released. * @returns True if the lock has been released. */ isReleased(): boolean; /** * Observes when the lock is released (It may be released due to a connection issue) * @returns An observable that emits when the lock is released. */ observeRelease(): Observable<void>; }