agentcontroller2

command module
v0.0.0-...-7f17660 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2015 License: Apache-2.0 Imports: 27 Imported by: 0

README

agentcontroller2

Build Status

JumpScale agentcontroller2 in Go

Installation

go get github.com/amrhassan/agentcontroller2

Running jsagencontroller

go run main.go -c agentcontroller2.toml

REST Service

Note: GID, NID and JID is extracted from URL or from JSON body

GET /[gid]/[nid]/cmd

  • If some commands are in redis queue ($GID:$NID), it's directly pushed
  • If nothing is pending, waits (long poll) for a command from redis

POST /[gid]/[nid]/log

  • Push logs to redis queue ($GID:$NID:LOG)

POST /[gid]/[nid]/result

  • Push job result to redis queue ($JID)

GET /[gid]/[nid]/stats

  • Save logs in influxdb database
  • Format: {timestamp: xxx, series: [[key, value], [key, value], ...]}

Commands Reader

  • Wait for commands from cmds_queue queue
  • Decode JSON from this queue
  • Push JSON on the right queue based on GID:NID

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Handling of tricky Agent polling logic.
Handling of tricky Agent polling logic.
Core interfaces and data structures that are used throughout AgentController
Core interfaces and data structures that are used throughout AgentController
AgentController's HTTP communication layer between Agent instances and itself
AgentController's HTTP communication layer between Agent instances and itself

Jump to

Keyboard shortcuts

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