Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pup/lib/core/pup.ts>Pup

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

Constructors

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

Properties

private
maintenance: (skip?) => 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
pluginHook(signal: string, args: unknown): boolean
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): Promise<boolean>
terminate(forceQuitMs: number)
unblock(id: string, requestor: string): boolean

Static Methods

init(unvalidatedConfiguration: unknown, configFilePath?: string)