Skip to main content
Module

x/pup/mod.ts>Pup

Universal process manager built in Deno
Go to Latest
class Pup
import { Pup } from "https://deno.land/x/pup@1.0.0-beta.36/mod.ts";

Constructors

new
Pup(
unvalidatedConfiguration: unknown,
configFilePath?: string,
temporaryStoragePath?: string,
persistentStoragePath?: string,
)

Properties

private
maintenance: () => unknown

Performs periodic maintenance tasks in Pup. Purges logs and state information older than the specified keepHours. This method is scheduled to run every hour.

private
optional
maintenanceTimer: number
private
requestTerminate: boolean
private
watchdog: () => unknown

Watchdog function that manages process lifecycle events like auto-start, restart, and timeouts.

private
optional
watchdogTimer: number
cleanup: () => unknown

This is intended to be called by global unload event and clears any stray files

cleanupQueue: string[]
optional
configFilePath: string
configuration: Configuration
events: EventEmitter
init: () => unknown
optional
ipc: FileIPC
logger: Logger
optional
persistentStoragePath: string
plugins: Plugin[]
processes: (Process | Cluster)[]
status: Status
optional
temporaryStoragePath: string

Methods

private
handleInstruction(message: IpcValidatedMessage)
private
pluginHook(signal: string, args: unknown): boolean
private
processIpcMessage(message: IpcValidatedMessage)
private
receiveData()
block(id: string, requestor: string): boolean
restart(id: string, requestor: string): boolean
start(id: string, requestor: string): boolean
stop(id: string, requestor: string): boolean
terminate(forceQuitMs: number)
unblock(id: string, requestor: string): boolean

Static Methods

init(unvalidatedConfiguration: unknown, configFilePath?: string)