apt-mesos: github.com/JetMuffin/apt-mesos/communication/api/client Index | Files

package client

import "github.com/JetMuffin/apt-mesos/communication/api/client"

Index

Package Files

client_handler.go result.go

Constants

const (
    MarshalError = `{"success":false,"error":"Cannot marshal json data.","result":null}`
)

MarshalError

type Handler Uses

type Handler struct {
    // contains filtered or unexported fields
}

Handler bring out a interface of Restful API

func NewHandler Uses

func NewHandler(core core.Core) *Handler

NewHandler return a new API

func (*Handler) AddTask Uses

func (h *Handler) AddTask() martini.Handler

AddTask submit a tasks method: POST path: /api/tasks

func (*Handler) CreateJob Uses

func (h *Handler) CreateJob() martini.Handler

CreateJob is the endpoint to create a new job method: POST path: /api/jobs

func (*Handler) DeleteTask Uses

func (h *Handler) DeleteTask() martini.Handler

DeleteTask delete and kill specific tasks method: POST path: /api/tasks/:taskId

func (*Handler) DownloadFile Uses

func (h *Handler) DownloadFile() martini.Handler

func (*Handler) GetFile Uses

func (h *Handler) GetFile() martini.Handler

GetFile get the file content

func (*Handler) GetNodes Uses

func (h *Handler) GetNodes() martini.Handler

GetNodes return all node information method: Get path: /api/nodes

func (*Handler) GetTask Uses

func (h *Handler) GetTask() martini.Handler

GetTask return a task method: GET path: /api/task/:id

func (*Handler) Handshake Uses

func (h *Handler) Handshake() martini.Handler

Handshake check the connection is connectable or not method: GET path: /api/handshake

func (*Handler) KillTask Uses

func (h *Handler) KillTask() martini.Handler

KillTask kill a task which is running method: PUT path: /api/tasks/:taskId/kill

func (*Handler) ListJobs Uses

func (h *Handler) ListJobs() martini.Handler

ListJobs list all jobs method: GET path: /api/tasks

func (*Handler) ListTasks Uses

func (h *Handler) ListTasks() martini.Handler

ListTasks list all tasks method: GET path: /api/tasks

func (*Handler) SystemMetric Uses

func (h *Handler) SystemMetric() martini.Handler

func (*Handler) SystemUsage Uses

func (h *Handler) SystemUsage() martini.Handler

Package client imports 9 packages (graph). Updated 2017-05-09. Refresh now. Tools for package owners. This is a dead-end fork (no commits since the fork).