myriag

command module
v0.0.0-...-8ad6148 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 2 Imported by: 0

README

Myriag

Arbitrary code execution server using Docker //in Go//.

Inspiration

Why

Just to play around with Docker SDK

Endpoints

GET /languages

List of enabled languages.
Example response:

["go", "typescript"]
POST /eval

Evaluate code.
JSON payload with language and code keys.
The language is as in the name of a subfolder in the languages directory.
Example payload:

{ "language": "go", "code": "package main; import \"fmt\"; func main() { fmt.Println(\"hello world\")}" }

Example response:

{ "result": "hello world\n" }

Errors with 404 if language is not found, 504 if evaluation timed out, or 500 if evaluation failed for other reasons.

GET /containers

List of containers being handled by Myriag.

POST /cleanup

Kill all containers, giving back the names of the containers killed.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL