api

package
v0.0.0-...-e4e8516 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2016 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateResponseToAgent

func GenerateResponseToAgent(db *gorp.DbMap, systemID int64, response command.ResponseToAgent) (string, int)

GenerateResponseToAgent creates a response the agent expects given a command If the command is a NOP, check if we have any tasks

Types

type Controller

type Controller struct {
	system.Controller
}

Controller object

func (*Controller) CatalogFileEvent

func (controller *Controller) CatalogFileEvent(c web.C, r *http.Request) (string, int)

CatalogFileEvent route is called by clients when a catalog file is used

func (*Controller) GetUpdate

func (controller *Controller) GetUpdate(c web.C, r *http.Request) (string, int)

GetUpdate route

func (*Controller) Heartbeat

func (controller *Controller) Heartbeat(c web.C, r *http.Request) (string, int)

Heartbeat route curl -d '{"SystemUUID":"29c0b4f4-d6ab-46d8-604a-268863059f76","CustomerUUID":"3d794551-91a0-4db4-6296-ffcbfc5577f9","CurrentClientTime":1415296881 }' http://127.0.0.1:8080/api/v1/Heartbeat

func (*Controller) ProcessEvent

func (controller *Controller) ProcessEvent(c web.C, r *http.Request) (string, int)

ProcessEvent route is called by clients when a process is started

Test with: curl -d '{"SystemUUID":"631a838a-9509-46de-7612-91f0a246cce9","CustomerUUID":"3d794551-91a0-4db4-6296-ffcbfc5577f9","CurrentClientTime":1,"TimeOfEvent":1,"Type":1,"PID":1,"PPID":1,"CommandLine":"this","Md5":"4ec38625fdb2bd3cf7e237f4b1387c04","Sha1":"142124bc228f603235f537298a893a95b6af5e28","Sha256":"5e2091457a435e68cc669189432635442360d70cf3f44880ccf1bd35ef393be1"}' http://127.0.0.1:8080/api/v1/ProcessEvent

func (*Controller) RegisterAgent

func (controller *Controller) RegisterAgent(c web.C, r *http.Request) (string, int)

RegisterAgent route

func (*Controller) Status

func (controller *Controller) Status(c web.C, r *http.Request) (string, int)

Status health check for the load balancer

func (*Controller) UploadFile

func (controller *Controller) UploadFile(c web.C, r *http.Request) (string, int)

UploadFile receives a file from the client

Jump to

Keyboard shortcuts

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