Skip to content

odysseymorphey/io-bound-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Server

HTTP API for managing long-running I/O bound tasks

Pecs

  • In-memory task storage
  • Asynchronous task processing
  • Thread-safe operations
  • Automatic memory cleanup when tasks are deleted

How to run

In root directory run command for build and execute. build is default goal.

make
make run

To run the tests, run this command.

make test

API Endpoints

  • POST /tasks - creates new task. Returns 202 Accepted and JSON struct
{
  "id": 1,
  "created_at": "2025-06-21T15:04:05Z",
  "status": "pending"
}
  • GET /tasks/{id} - returns information on a specific task
    • id — numeric identifier.
    • created_at — date/time of creation.
    • status — one of: pending, running, completed, canceled, failed.
    • result — string with result (present if status == completed).
    • error — error text (if status == failed)
{
  "id": 1,
  "created_at": "2025-06-21T15:04:05Z",
  "status": "completed",
  "result": "example"
}
  • DELETE /tasks/{id} - delete/cancel task
    • 200 OK - if success
    • 404 Not Found - if task not found

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages