Skip to content

@codesoul-co/hypha-adapters-local / runtime-capacity-semaphore

Using this module

Use the Runtime capacity semaphore module for executing runtime behavior at this boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

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

import type {
  SQLiteRuntimeCapacitySemaphoreOptions,
} 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
SQLiteRuntimeCapacitySemaphoreclassnew SQLiteRuntimeCapacitySemaphore(options: SQLiteRuntimeCapacitySemaphoreOptions): SQLiteRuntimeCapacitySemaphoreSQLite Runtime Capacity Semaphore class with 7 public constructor or member entries; its exact declarations are listed below.
SQLiteRuntimeCapacitySemaphoreOptionsinterfaceinterface SQLiteRuntimeCapacitySemaphoreOptionsSQLite Runtime Capacity Semaphore Options interface with 2 public fields or methods.

SQLiteRuntimeCapacitySemaphore

SQLite Runtime Capacity Semaphore class with 7 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SQLiteRuntimeCapacitySemaphore } from '@codesoul-co/hypha-adapters-local';
  • Source module: runtime-capacity-semaphore

Declaration

text
export declare class SQLiteRuntimeCapacitySemaphore implements RuntimeCapacitySemaphore {
    constructor(options: SQLiteRuntimeCapacitySemaphoreOptions);
    acquire(request: RuntimeCapacityAcquireRequest): Promise<RuntimeCapacityLease | null>;
    renew(request: RuntimeCapacityRenewRequest): Promise<RuntimeCapacityLease>;
    release(request: RuntimeCapacityReleaseRequest): Promise<void>;
    assertCurrent(request: RuntimeCapacityAssertionRequest): Promise<RuntimeCapacityLease>;
    usage(request: RuntimeCapacityUsageRequest): Promise<RuntimeCapacityUsage>;
    close(): void;
}

Public members

MemberKindSignatureDescription
acquiremethodacquire(request: RuntimeCapacityAcquireRequest): Promise<RuntimeCapacityLease | null>Public method; parameters and return type are shown in the signature.
assertCurrentmethodassertCurrent(request: RuntimeCapacityAssertionRequest): Promise<RuntimeCapacityLease>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: SQLiteRuntimeCapacitySemaphoreOptions): SQLiteRuntimeCapacitySemaphoreCreates an instance of this class.
releasemethodrelease(request: RuntimeCapacityReleaseRequest): Promise<void>Public method; parameters and return type are shown in the signature.
renewmethodrenew(request: RuntimeCapacityRenewRequest): Promise<RuntimeCapacityLease>Public method; parameters and return type are shown in the signature.
usagemethodusage(request: RuntimeCapacityUsageRequest): Promise<RuntimeCapacityUsage>Public method; parameters and return type are shown in the signature.

SQLiteRuntimeCapacitySemaphoreOptions

SQLite Runtime Capacity Semaphore Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { SQLiteRuntimeCapacitySemaphoreOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: runtime-capacity-semaphore

Declaration

text
export interface SQLiteRuntimeCapacitySemaphoreOptions {
    filename: string;
    policy: RuntimeCapacityPolicy;
}

Contract members

MemberKindSignatureDescription
filenamepropertyfilename: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
policypropertypolicy: RuntimeCapacityPolicyPublic property; its type, readonly modifier and optionality are shown in the signature.