MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readDaemonRecord

Function readDaemonRecord

apps/cli/src/daemon-state.ts:214–226  ·  view source on GitHub ↗
(input: {
  hostname: string;
  port: number;
})

Source from the content-addressed store, hash-verified

212};
213
214export const readDaemonRecord = (input: {
215 hostname: string;
216 port: number;
217}): Effect.Effect<DaemonRecord | null, never, FileSystem.FileSystem | Path.Path> =>
218 Effect.gen(function* () {
219 const fs = yield* FileSystem.FileSystem;
220 const path = yield* Path.Path;
221 const raw = yield* fs
222 .readFileString(daemonRecordPath(path, input))
223 .pipe(Effect.catchCause(() => Effect.succeed(null)));
224 if (raw === null) return null;
225 return parseRecord(raw);
226 });
227
228export const removeDaemonRecord = (input: {
229 hostname: string;

Callers 3

stopDaemonFunction · 0.90
main.tsFile · 0.90

Calls 2

daemonRecordPathFunction · 0.85
parseRecordFunction · 0.85

Tested by

no test coverage detected