Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a struct encapuslating a runner agent that executes tasks for a specific resource. Upon dispatch, it will automatically complete the resource in the queue. It is assumed that the consumer will be familiar with the semantics of the broker and dispatcher before implementing an agent.
func New ¶
func New(cc brokerclient.Config, resource string, dispatcher dispatcher.Table) *Agent
New constructs a new agent. Typically used inside other constructors, this sews together the dispatcher, resource and a client for future "ticking" or looping.
func (*Agent) Loop ¶
Loop runs the full loop which will wait at appropriate times to avoid bombing out the service. Cancel the context to terminate it.
Click to show internal directories.
Click to hide internal directories.