Skip to content

@codesoul-co/hypha-core / modules/execution-port/governed-execution-port

模块用法

用于定义或实现 Provider-neutral Port。Governed execution port 模块公开 1 类。

从包入口导入

ts
import {
  GovernedExecutionPort,
} from '@codesoul-co/hypha-core';

使用要点

  • 1 个类提供可实例化的运行时实现;构造参数与公开方法在各自条目中完整列出。

公共导出

Symbol种类签名说明
GovernedExecutionPortnew GovernedExecutionPort(authorizationVerifier: ExecutionAuthorizationVerifier, dispatcher: ExecutionOperationDispatcher, now: () => string): GovernedExecutionPortGoverned Execution Port 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。

GovernedExecutionPort

Governed Execution Port 类,共公开 2 个构造函数或成员;精确签名见本条目的声明与成员表。

声明

text
export declare class GovernedExecutionPort implements ExecutionPort {
    constructor(authorizationVerifier: ExecutionAuthorizationVerifier, dispatcher: ExecutionOperationDispatcher, now: () => string);
    execute(input: ExecutionDispatchRequest, abortSignal: AbortSignal): Promise<ExecutionActivityResult>;
}

公开成员

成员种类签名说明
constructor构造函数(authorizationVerifier: ExecutionAuthorizationVerifier, dispatcher: ExecutionOperationDispatcher, now: () => string): GovernedExecutionPort创建该类的实例。
execute方法execute(input: ExecutionDispatchRequest, abortSignal: AbortSignal): Promise<ExecutionActivityResult>公开方法;参数与返回类型以签名列为准。