api

package
v0.0.0-...-b858303 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commands

func Commands() *mux.Router

Commands is the main function of this package

func SetConfig

func SetConfig(cfg *cfg.Config)

SetConfig set the global config

func V0StartCommand

func V0StartCommand(w http.ResponseWriter, r *http.Request)

V0StartCommand will start a simple command example: curl -X POST 127.0.0.1:10000/v0/cmd/start\?cmd\=python%20-m%20SimpleHTTPServer%209033\&shell=true/false

func V0StartContainer

func V0StartContainer(w http.ResponseWriter, r *http.Request)

V0StartContainer will start a mesos container example: curl -X POST 127.0.0.1:10000/v0/sandbox/start -d 'JSON'

{
  "Command": "./download",
  "Uris": [
    {
      "Value": "https://<BINFILE>",
      "Extract": "false",
      "Executable": "true",
      "Cache": "false",
      "OutputFile": "RUNME"
    }
  ]
}

func V0StatusContainer

func V0StatusContainer(w http.ResponseWriter, r *http.Request)

V0StatusContainer will return the status of the taskID example: curl -X GET 127.0.0.1:10000/v0/container/{taskID} -d 'JSON'

Types

This section is empty.

Jump to

Keyboard shortcuts

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