UNPKG

node-universe

Version:

基于 Nodejs 环境的一款微服务框架,原理来自于宇宙中的恒星,行星,卫星等系统。

61 lines (60 loc) 2.34 kB
import { actionHookMiddleware } from './action-hook'; import bulkheadMiddleware from './bulkhead'; import cacherMiddleware from './cacher'; import errorHandlerMiddleware from './error-handler'; import FallbackMiddleware from './fallback'; import HotReloadMiddleware from './hot-reload'; import metricsHandlerMiddleware from './metrics'; import timeoutHandlerMiddleware from './timeout'; import ValidatorMiddleware from './validator'; declare function register(name: string, value: any): void; declare const _default: { ActionHook: typeof actionHookMiddleware; Bulkhead: typeof bulkheadMiddleware; Cacher: typeof cacherMiddleware; CircuitBreaker: (star: import("../star").default) => { name: string; created(star: any): void; localAction: (handler: any, action: any) => any; remoteAction: (handler: any, action: any) => any; stopped(): void; }; ContextTracker: (star: import("../star").default) => { name: string; localAction: (handler: any) => any; remoteAction: (handler: any) => any; localEvent: (handler: any) => any; created(star: any): void; serviceStarting(service: any): void; serviceStopping(service: any): Promise<void>; stopping(star: any): Promise<void>; }; Debounce: (star: import("../star").default) => { name: string; localEvent: (handler: any, event: any) => any; }; ErrorHandler: typeof errorHandlerMiddleware; Fallback: typeof FallbackMiddleware; HotReload: typeof HotReloadMiddleware; Metrics: typeof metricsHandlerMiddleware; Retry: (star: import("../star").default) => { name: string; created(): void; localAction: (handler: any, action: any) => any; remoteAction: (handler: any, action: any) => any; }; Throttle: (star: import("../star").default) => { name: string; localEvent: (handler: any, event: any) => any; }; Timeout: typeof timeoutHandlerMiddleware; Tracing: (star: import("../star").default) => { name: string; localAction: ((handler: any, action: any) => any) | null; localEvent: ((handler: any, event: any) => any) | null; }; Validator: typeof ValidatorMiddleware; } & { register: typeof register; }; export default _default;