Skip to content

@codesoul-co/hypha-adapters-local / run-lease-store

Using this module

Use the Run lease store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

ts
import {
  SQLiteRunLeaseStore,
} from '@codesoul-co/hypha-adapters-local';

import type {
  SQLiteRunLeaseStoreOptions,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
SQLiteRunLeaseStoreclassnew SQLiteRunLeaseStore(options: SQLiteRunLeaseStoreOptions): SQLiteRunLeaseStoreSQLite Run Lease Store class with 8 public constructor or member entries; its exact declarations are listed below.
SQLiteRunLeaseStoreOptionsinterfaceinterface SQLiteRunLeaseStoreOptionsSQLite Run Lease Store Options interface with 2 public fields or methods.

SQLiteRunLeaseStore

SQLite Run Lease Store class with 8 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SQLiteRunLeaseStore } from '@codesoul-co/hypha-adapters-local';
  • Source module: run-lease-store

Declaration

text
export declare class SQLiteRunLeaseStore implements RunLeaseStore {
    constructor(options: SQLiteRunLeaseStoreOptions);
    acquire(request: RunLeaseAcquireRequest): Promise<FencedRunLease | null>;
    preempt(request: RunLeasePreemptRequest): Promise<FencedRunLease>;
    heartbeat(request: RunLeaseHeartbeatRequest): Promise<FencedRunLease>;
    release(request: RunLeaseReleaseRequest): Promise<void>;
    get(scope: RunLeaseScope, checkedAt?: string): Promise<FencedRunLease | null>;
    assertCurrent(request: RunLeaseAssertionRequest): Promise<FencedRunLease>;
    close(): void;
}

Public members

MemberKindSignatureDescription
acquiremethodacquire(request: RunLeaseAcquireRequest): Promise<FencedRunLease | null>Public method; parameters and return type are shown in the signature.
assertCurrentmethodassertCurrent(request: RunLeaseAssertionRequest): Promise<FencedRunLease>Public method; parameters and return type are shown in the signature.
closemethodclose(): voidPublic method; parameters and return type are shown in the signature.
constructorconstructor(options: SQLiteRunLeaseStoreOptions): SQLiteRunLeaseStoreCreates an instance of this class.
getmethodget(scope: RunLeaseScope, checkedAt?: string): Promise<FencedRunLease | null>Public method; parameters and return type are shown in the signature.
heartbeatmethodheartbeat(request: RunLeaseHeartbeatRequest): Promise<FencedRunLease>Public method; parameters and return type are shown in the signature.
preemptmethodpreempt(request: RunLeasePreemptRequest): Promise<FencedRunLease>Public method; parameters and return type are shown in the signature.
releasemethodrelease(request: RunLeaseReleaseRequest): Promise<void>Public method; parameters and return type are shown in the signature.

SQLiteRunLeaseStoreOptions

SQLite Run Lease Store Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SQLiteRunLeaseStoreOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: run-lease-store

Declaration

text
export interface SQLiteRunLeaseStoreOptions {
    filename: string;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
filenamepropertyfilename: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.