const BASE = 'http://localhost:8000'
const call = (path: string) => fetch(`${BASE}/api/engine/${path}`, { method: 'POST' })

export const pauseEngine   = () => call('pause')
export const resumeEngine  = () => call('resume')
export const restartEngine = () => call('restart')
export const killEngine    = () => call('kill')
