UNPKG

lemon-engine

Version:

Lemon Engine Module to Synchronize Node over DynamoDB + ElastiCache + Elasticsearch by [lemoncloud](https://lemoncloud.io)

36 lines (35 loc) 1.52 kB
/** * Notify Service Exports * - General Service for Notify Event Trigger/Subscription. * * ## 요구 사항 * 1. Internal/External 방식의 이벤트를 발생시킬 수 있음. * 2. Notify 구조체는 트리 방식으로 조합 가능하다. * 3. Parent/Child 구조로, 1개의 대표 child 와 다수의 child 를 가질 수 있다. * 4. Core 테이블은 대표 child 로 역할을 한다. * 5. do_notify(), do_subscribe() 를 공통 지원해야함. * 6. do_subscribe()는 절대로, 비동기 방식이 아닌 '동기화' 호출을 유지해야함 (초기화시 필요해보임). * * * ## Notify ID 형식 (예: this -> IIS -> ICS+IMS ) * - :record:* # 호출 되는 모듈이 대상. => IIS:record:* * - ICS:record:* # 자식이 ICS 가 나올때까지 들어간다.. * * * ## Notify Bubble Up * - 자식에서 Notify 가 발생하면, 이를 수신한 부모는 상위로 올릴지 결정. * - 대표 Child (Core 테이블) 에서 발생한 것을 위로 올릴 수 있음. * - 일반 Child 는 그냥 무시된다. (또는 직접 연결하던가) * * * @author steve@lemoncloud.io * @date 2019-05-23 * @copyright (C) lemoncloud.io 2019 - All Rights Reserved. */ import { EnginePluggable, EnginePluginBuilder, GeneralFuntion } from '../common/types'; export interface NotifyService extends EnginePluggable { do_notify: GeneralFuntion; do_subscribe: GeneralFuntion; } declare const maker: EnginePluginBuilder<NotifyService>; export default maker;