command
module
Version:
v0.0.0-...-7f17660
Opens a new window with list of versions in this module.
Published: Nov 8, 2015
License: Apache-2.0
Opens a new window with license information.
Imports: 27
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
agentcontroller2
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
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
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 |
|
|
Click to show internal directories.
Click to hide internal directories.