arvo-event-handler
Version:
A complete set of orthogonal event handler and orchestration primitives for Arvo based applications, featuring declarative state machines (XState), imperative resumables for agentic workflows, contract-based routing, OpenTelemetry observability, and in-me
14 lines (13 loc) • 828 B
TypeScript
import type { Span } from '@opentelemetry/api';
import { type ArvoEvent } from 'arvo-core';
import type { SyncEventResource } from '../../SyncEventResource';
import type { AcquiredLockStatusType } from '../../SyncEventResource/types';
import { MachineMemoryMetadata } from '../../MachineMemory/interface';
/**
* Acquires an exclusive lock for event processing with validation.
*
* Attempts to obtain a lock on the event's subject to ensure exclusive access during
* processing. Throws if lock cannot be acquired, preventing concurrent modifications.
* @throws {TransactionViolation} When lock cannot be acquired
*/
export declare const acquireLockWithValidation: (syncEventResource: SyncEventResource<Record<string, any>>, event: ArvoEvent, metadata: MachineMemoryMetadata, span: Span) => Promise<AcquiredLockStatusType>;