MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolveServiceManager

Function resolveServiceManager

packages/server/src/svc/service.ts:8–19  ·  view source on GitHub ↗
(platform: NodeJS.Platform = process.platform)

Source from the content-addressed store, hash-verified

6import { ServiceUnsupportedError, type ServiceManager } from './types';
7
8export function resolveServiceManager(platform: NodeJS.Platform = process.platform): ServiceManager {
9 switch (platform) {
10 case 'darwin':
11 return createLaunchdManager();
12 case 'linux':
13 return createSystemdManager();
14 case 'win32':
15 return createSchtasksManager();
16 default:
17 return createUnsupportedManager(platform);
18 }
19}
20
21
22function createUnsupportedManager(platform: string): ServiceManager {

Callers 1

server.test.tsFile · 0.85

Calls 4

createLaunchdManagerFunction · 0.90
createSystemdManagerFunction · 0.90
createSchtasksManagerFunction · 0.90
createUnsupportedManagerFunction · 0.85

Tested by

no test coverage detected