agentpoll

package
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: 4 Imported by: 0

Documentation

Overview

Handling of tricky Agent polling logic. Should eventually be made a lot simpler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PollData

type PollData struct {
	Roles          []core.AgentRole
	CommandChannel chan core.Command
}

PollData Gets a chain for the caller to wait on, we return a chan chan string instead of chan string directly to make sure of the following: 1- The redis pop loop will not try to pop jobs out of the queue until there is a caller waiting

for new commands

2- Prevent multiple clients polling on a single gid:nid at the same time.

type PollDataStream

type PollDataStream chan PollData

type PollDataStreamManager

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

A manager of Handler instances

func NewManager

func NewManager(agentData core.AgentInformationStorage, commandStorage core.CommandStorage) *PollDataStreamManager

func (*PollDataStreamManager) Get

func (manager *PollDataStreamManager) Get(agentID core.AgentID) PollDataStream

Jump to

Keyboard shortcuts

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