UNPKG

node-universe

Version:

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

207 lines (206 loc) 6.38 kB
import Star from '.'; import Context from '../context'; export default function (star: Star): { name: string; actions: { list: { cache: boolean; trancing: boolean; params: { withService: { type: string; optional: boolean; convert: boolean; default: boolean; }; onlyAvailable: { type: string; optional: boolean; convert: boolean; default: boolean; }; }; handler(ctx: Context): Omit<import("../registry/node").default, "rawInfo" | "services">[] | undefined; }; services: { cache: boolean; tracing: boolean; params: { onlyLocal: { type: string; optional: boolean; convert: boolean; default: boolean; }; skipInternal: { type: string; optional: boolean; convert: boolean; default: boolean; }; withActions: { type: string; optional: boolean; convert: boolean; default: boolean; }; withEvents: { type: string; optional: boolean; convert: boolean; default: boolean; }; onlyAvailable: { type: string; optional: boolean; convert: boolean; default: boolean; }; grouping: { type: string; optional: boolean; convert: boolean; default: boolean; }; }; handler(ctx: Context): any[] | undefined; }; actions: { cache: boolean; trancing: boolean; params: { onlyLocal: { type: string; optional: boolean; convert: boolean; default: boolean; }; skipInternal: { type: string; optional: boolean; convert: boolean; default: boolean; }; onlyAvailable: { type: string; optional: boolean; convert: boolean; default: boolean; }; }; handler(ctx: Context): any[] | undefined; }; events: { cache: boolean; tracing: boolean; params: { onlyLocal: { type: string; optional: boolean; convert: boolean; default: boolean; }; skipInternal: { type: string; optional: boolean; convert: boolean; default: boolean; }; withEndpoints: { type: string; optional: boolean; convert: boolean; default: boolean; }; onlyAvailable: { type: string; optional: boolean; convert: boolean; default: boolean; }; }; handler(ctx: Context): any[] | undefined; }; health: { cache: boolean; tracing: boolean; handler(): { cpu: any; memory: any; os: { uptime: number; type: string; release: string; hostname: string; arch: string; platform: NodeJS.Platform; user: {}; }; process: { pid: number; memory: NodeJS.MemoryUsage; uptime: number; argv: string[]; }; client: { type: string; version: string; langVersionL: string; }; net: { ip: string[]; }; time: { now: number; iso: string; utc: string; }; }; }; options: { cache: boolean; tracing: boolean; handler(): any; }; metrics: { cache: boolean; tracing: boolean; params: { types: { type: string; optional: boolean; rules: ({ type: string; items?: undefined; } | { type: string; items: string; })[]; }; includes: { type: string; optional: boolean; rules: ({ type: string; items?: undefined; } | { type: string; items: string; })[]; }; excludes: { type: string; optional: boolean; rules: ({ type: string; items?: undefined; } | { type: string; items: string; })[]; }; }; handler(ctx: Context): Promise<never> | import("../../typings").GenericObject[] | undefined; }; }; };