comms

package
v0.0.0-...-7630055 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewToDDComms

func NewToDDComms(cfg config.Config) (*toddComms, error)

NewToDDComms will create a new instance of toddComms, and load the desired CommsPackage-compatible comms package into it.

Types

type CommsPackage

type CommsPackage interface {

	// (agent advertisement to advertise)
	AdvertiseAgent(defs.AgentAdvert) error

	// (map of assets:hashes)
	ListenForAgent(map[string]map[string]string) error

	// (uuid)
	ListenForTasks(string) error

	// (queuename, task)
	SendTask(string, tasks.Task) error

	// watches for new group membership instructions in the cache and reregisters
	WatchForGroup()

	ListenForGroupTasks(string, chan bool) error

	ListenForResponses(*chan bool) error
	SendResponse(responses.Response) error
}

CommsPackage will ensure that whatever specific comms struct is loaded at compile time will support all of the necessary features/functions that we need to make ToDD work. In short, this interface represents a list of things that the server and agents do on the message queue.

Jump to

Keyboard shortcuts

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