Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentComms ¶
func NewAgentComms(cfg config.Config, ac *cache.AgentCache) (*toddComms, error)
NewAgentComms returns a comms instance configured for agent usages.
TODO: accept an interface for cache instead of concrete type
func NewToDDComms ¶
NewToDDComms will create a new instance of toddComms, and load the desired CommsPackage-compatible comms package into it.
Types ¶
type Package ¶
type Package interface { // (agent advertisement to advertise) AdvertiseAgent(defs.AgentAdvert) error // (map of assets:hashes, base asset URL) ListenForAgent(assetProvider, 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() error ListenForGroupTasks(string, chan bool) error ListenForResponses(*chan bool) error SendResponse(responses.Response) error // contains filtered or unexported methods }
Package 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.
Click to show internal directories.
Click to hide internal directories.