Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/pup/lib/common/ipc.ts>FileIPC#extractMessages

Universal process manager built in Deno
Go to Latest
method FileIPC.prototype.extractMessages
import { FileIPC } from "https://deno.land/x/pup@1.0.0-beta.33/lib/common/ipc.ts";

extractMessages is a private helper function that reads from the IPC file, validates the messages and returns them as an array of IpcValidatedMessage. It also handles the removal of the file after reading and validates the data based on the staleMessageLimitMs.

This function is called every time a 'modify' event is detected by the file watcher started in startWatching method.

Note: This function should only be used internally by the FileIPC class and is not meant to be exposed to external consumers.