For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/sapi/service/functions/setServiceModuleContext.md.
  • 简体中文
  • Function: setServiceModuleContext()

    function setServiceModuleContext(
       moduleId: string, 
       token: string, 
       inTx: () => boolean): void;

    Defined in: sapi/service/client.ts:218

    注入/刷新模块的 service 访问身份,并激活为单例 service 的转发目标。

    Parameters

    ParameterType
    moduleIdstring
    tokenstring
    inTx() => boolean

    Returns

    void