Documentation ¶
Overview ¶
Package message is a service to process and return Agent Base messages
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Agent uuid.UUID ClientService *client.Service P2PService *p2p.Service JobService *job.Service }
Service is the structure used to interact with message objects
func NewMessageService ¶
NewMessageService is the factory to create a new service for handling base messages
func (*Service) Check ¶
func (s *Service) Check() (msg messages.Base)
Check does not block but looks to see if there are any jobs or delegates that need to be returned to the Merlin server
func (*Service) Get ¶
func (s *Service) Get() (msg messages.Base)
Get blocks until there is a return base message to send back to the Merlin server
func (*Service) GetDelegates ¶
func (s *Service) GetDelegates()
GetDelegates blocks waiting for a delegate message that needs to be returned to the Merlin server and adds it to the out channel as a Base message type of CHECKIN because it will not be aggregated with other return message types. Used when the Agent doesn't sleep and only communicates when there is a message to send
func (*Service) GetJobs ¶
func (s *Service) GetJobs()
GetJobs blocks waiting for a return job to exist, adds it to a Base message, and adds it to the out channel. Used when the Agent doesn't sleep and only communicates when there is a message to send