콘텐츠로 이동

OperationsJobsModule — @gj-kit/nest-operations-jobs

@gj-kit/nest-operations-jobs에서 공개하는 class입니다. package version 0.1.1의 release declaration을 그대로 표시합니다.

import { OperationsJobsModule } from '@gj-kit/nest-operations-jobs';
/**
* The operations job platform. Job definitions live as providers in the host's
* own domain modules (`@OperationsJobDefinition()`); this module owns only the
* execution environment: registry collection, the runner, trigger
* authentication and — optionally — the trigger controller.
*/
declare class OperationsJobsModule {
/**
* Synchronous wiring. Authentication is validated here, at assembly time: a
* deployment with neither a shared secret nor a token verifier fails to boot
* instead of failing on the scheduler's first call.
*
* The registry and the runner are bound as **factories**, so each DI container
* built from the returned module gets its own pair. Binding instances would
* make the returned object stateful: the host module that holds this call is
* evaluated once, and every later application built from it — an e2e suite's
* second `Test.createTestingModule`, a warm serverless re-init, HMR — would
* re-register the same jobs into the already-populated registry and die with
* `ERR_JOB_DUPLICATE_KEY` blaming the job class.
*/
static forRoot(options: OperationsJobsModuleOptions): DynamicModule;
/**
* Asynchronous wiring, for hosts whose store or secret comes from another
* provider. `auth` is validated immediately after the factory resolves, so the
* boot-failure guarantee survives this path.
*
* The trigger controller cannot be registered from here — a Nest module's
* controller list is fixed before the factory runs. Async hosts put
* `createOperationsJobsController({ path })` in their own module's
* `controllers` array.
*/
static forRootAsync(options: OperationsJobsModuleAsyncOptions): DynamicModule;
}

이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.

  • 패키지: @gj-kit/nest-operations-jobs
  • 버전: 0.1.1
  • 공개 entry: .
  • 소스: GitHub

The operations job platform. Job definitions live as providers in the host’s own domain modules (@OperationsJobDefinition()); this module owns only the execution environment: registry collection, the runner, trigger authentication and — optionally — the trigger controller.