Options
All
  • Public
  • Public/Protected
  • All
Menu

pandora

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

CategoryReg

CategoryReg: string | "all" | "weak-all"

Entry

Entry: string | object

ProcessScale

ProcessScale: number | "auto"

VersionsIntrospectionResult

VersionsIntrospectionResult: ProcessVersions & object

Variables

$ProcessName

$ProcessName: symbol = Symbol('ProcessName')

CompactMetricsCollector

CompactMetricsCollector: any

ConsoleLogger

ConsoleLogger: any = require('egg-logger').EggConsoleLogger

DAEMON_MESSENGER

DAEMON_MESSENGER: "pandora_daemon_messenger" = "pandora_daemon_messenger"

DAEMON_READY

DAEMON_READY: "daemon_ready" = "daemon_ready"

DEFAULT_WRAP_MAX_DEPTH

DEFAULT_WRAP_MAX_DEPTH: 2 = 2

DaemonEndPoint

DaemonEndPoint: any

DaemonResource

DaemonResource: any

DefaultEnvironment

DefaultEnvironment: any

ErrorEndPoint

ErrorEndPoint: any

ErrorResource

ErrorResource: any

FINISH_SHUTDOWN

FINISH_SHUTDOWN: "finish_shutdown" = "finish_shutdown"

FileMetricsManagerReporter

FileMetricsManagerReporter: any

HealthEndPoint

HealthEndPoint: any

HealthResource

HealthResource: any

InfoEndPoint

InfoEndPoint: any

InfoResource

InfoResource: any

LoggerService

LoggerService: any

MetricsClient

MetricsClient: any

MetricsEndPoint

MetricsEndPoint: any

MetricsResource

MetricsResource: any

MetricsServerManager

MetricsServerManager: any

NormalMetricsCollector

NormalMetricsCollector: any

PANDORA_CWD

PANDORA_CWD: "PANDORA_CWD" = "PANDORA_CWD"

PANDORA_GLOBAL_CONFIG

PANDORA_GLOBAL_CONFIG: "PANDORA_CONFIG" = "PANDORA_CONFIG"

PANDORA_HOME

PANDORA_HOME: "PANDORA_HOME" = "PANDORA_HOME"

PANDORA_PROCESS

PANDORA_PROCESS: "PANDORA_PROCESS_REPRESENTATION" = "PANDORA_PROCESS_REPRESENTATION"

PROCESS_ERROR

PROCESS_ERROR: "process_error" = "process_error"

PROCESS_READY

PROCESS_READY: "process_ready" = "process_ready"

PROCFILE_NAMES

PROCFILE_NAMES: string[] = ['procfile.js', 'procfile.ts']

ProcessEndPoint

ProcessEndPoint: any

ProcessResource

ProcessResource: any

RELOAD

RELOAD: "reload" = "reload"

RELOAD_ERROR

RELOAD_ERROR: "reload_error" = "reload_error"

RELOAD_SUCCESS

RELOAD_SUCCESS: "reload_success" = "reload_success"

RELOAD_TIMEOUT

RELOAD_TIMEOUT: number = 10 * 1000

SEND_DAEMON_MESSAGE

SEND_DAEMON_MESSAGE: "send_daemon_message" = "send_daemon_message"

SERVICE_PREFIX_IN_HUB

SERVICE_PREFIX_IN_HUB: "" = ""

SERVICE_RESERVE_NAME

SERVICE_RESERVE_NAME: string[] = ['all']

SHUTDOWN

SHUTDOWN: "shutdown" = "shutdown"

SHUTDOWN_TIMEOUT

SHUTDOWN_TIMEOUT: number = 5 * 1000

TraceEndPoint

TraceEndPoint: any

TraceReporter

TraceReporter: any

TraceResource

TraceResource: any

WORKER_EXIT

WORKER_EXIT: "worker_exit" = "worker_exit"

WORKER_READY

WORKER_READY: "worker_ready" = "worker_ready"

appDir

appDir: string

appName

appName: string

cFork

cFork: any = require('../../3rd/fork')

cmdDid

cmdDid: boolean = false

consoleLogger

consoleLogger: any = new ConsoleLogger({level: 'INFO',})

daemonLogger

daemonLogger: any = null

debug

debug: any = require('debug')('pandora:cluster:monitor')

defaultWorkerCount

defaultWorkerCount: number = process.env.DEFAULT_WORKER_COUNT ? parseInt(process.env.DEFAULT_WORKER_COUNT) : cpus().length

env

env: string

environment

environment: Environment

eolReg

eolReg: RegExp = new RegExp(EOL + '$')

extend

extend: any = require('extend')

facade

facade: any = Facade.getInstance()

Facade

foundAll

foundAll: symbol = Symbol()

getHub

getHub: getHub

getProxy

getProxy: getProxy

getService

getService: getService

getServiceClass

getServiceClass: getServiceClass

globalConfigProcessor

globalConfigProcessor: GlobalConfigProcessor = GlobalConfigProcessor.getInstance()

hooks

hooks: any = require('pandora-hook')

is

is: any = require('is-type-of')

pathDaemonBootstrap

pathDaemonBootstrap: string = require.resolve('./DaemonBootstrap')

pathProcessBootstrap

pathProcessBootstrap: string = require.resolve('./ProcessBootstrap')

pathToProcessBootstrap

pathToProcessBootstrap: string = require.resolve('./ProcessBootstrap')

pidFile

pidFile: string = path.join(tmpDir, 'nodejs_pandora.pid')

portOffset

portOffset: 1 = 1

preparedClient

preparedClient: MessengerClient = null

processContext

processContext: ProcessContextAccessor

processName

processName: string

publishObject

publishObject: publishObject

tmpDir

tmpDir: string = process.env.PANDORA_TMP_DIR || os.tmpdir()

tmpdir

tmpdir: string = process.env.PANDORA_TMP_DIR || os.tmpdir()

traceManager

traceManager: TraceManager

wrap

wrap: any = require('pandora-spawn-wrap')

wrapFile

wrapFile: string = require.resolve('./spawnWrapper')

Functions

appToIntrospection

attachEntryParams

  • attachEntryParams(command: any, cliConfig: any, defaultConfig?: object): any
  • Parameters

    • command: any
    • cliConfig: any
    • Default value defaultConfig: object = {}

    Returns any

backupLog

  • backupLog(file: any, newName?: any): Promise<void>

barrierDaemon

  • barrierDaemon(options?: any): Promise<void | Object>
  • Ensure the daemon is running

    Parameters

    • Optional options: any

    Returns Promise<void | Object>

calcAppName

  • calcAppName(dir?: any): any

clearCliExit

  • clearCliExit(code: any): void
  • Exit the daemon automatically if there not remind any application.

    Parameters

    • code: any

    Returns void

cmd

  • cmd(): void

createAppLogger

  • createAppLogger(appName: any, logName: any): any

getAppLogDir

  • getAppLogDir(appName: any): string

getAppLogPath

  • getAppLogPath(appName: any, logName: any): string

getDaemonClient

  • getDaemonClient(args?: object): Promise<MessengerClient>

getDaemonLogPath

  • getDaemonLogPath(): string

getDaemonLogger

  • getDaemonLogger(): ILogger

getDaemonStdoutLogPath

  • getDaemonStdoutLogPath(): string

getMessengerClient

  • getMessengerClient(): Client

getPandoraLogsDir

  • getPandoraLogsDir(): any

getProcfileBasePath

  • getProcfileBasePath(tagetPath: any): string

isDaemonRunning

  • isDaemonRunning(): Promise<boolean>

lazyGetGlobalConfig

  • lazyGetGlobalConfig(): any

main

  • main(): Promise<void>

parseInspectPort

  • parseInspectPort(inspect: string): object

removeEOL

  • removeEOL(str: string): string

removePkgNameScope

  • removePkgNameScope(pkgName: string): string

send

  • send(command: any, args: any, callback: any, timeout?: any): Promise<void>
  • Send a message to the daemon, it will start the daemon automatically if that is't running.

    Parameters

    • command: any
    • args: any
    • callback: any
    • Optional timeout: any

    Returns Promise<void>

startDaemonReal

  • startDaemonReal(options: any, resolve: any, reject: any): ChildProcess

yyyymmdd

  • yyyymmdd(date: any, sp: any): string