Documentation ¶
Overview ¶
Package processor implements MDS plugin processor
Package processor implements MDS plugin processor processor_core contains functions that fetch messages and schedule them to be executed
Package processor implements MDS plugin processor processor_coreplugin contains the ICoreModule implementation
Package processor implements MDS plugin processor processor_scheduler contains the GetMessages Scheduler implementation
Package processor implements MDS plugin processor processor_state contains utilities that interact with the state manager
Package processor implements MDS plugin processor processor_utils contains utility functions
Index ¶
- type MockedMDS
- func (mdsMock *MockedMDS) AcknowledgeMessage(log log.T, messageID string) error
- func (mdsMock *MockedMDS) DeleteMessage(log log.T, messageID string) error
- func (mdsMock *MockedMDS) FailMessage(log log.T, messageID string, failureType service.FailureType) error
- func (mdsMock *MockedMDS) GetMessages(log log.T, instanceID string) (messages *ssmmds.GetMessagesOutput, err error)
- func (mdsMock *MockedMDS) SendReply(log log.T, messageID string, payload string) error
- func (mdsMock *MockedMDS) Stop()
- type MockedPluginRunner
- type MockedReplyBuilder
- type MockedSendResponse
- type PluginRunner
- type Processor
- type TopicPrefix
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockedMDS ¶
MockedMDS stands for a mock MDS service.
func (*MockedMDS) AcknowledgeMessage ¶
AcknowledgeMessage mocks the service function with the same name.
func (*MockedMDS) DeleteMessage ¶
DeleteMessage mocks the service function with the same name.
func (*MockedMDS) FailMessage ¶
func (mdsMock *MockedMDS) FailMessage(log log.T, messageID string, failureType service.FailureType) error
FailMessage mocks the service function with the same name.
func (*MockedMDS) GetMessages ¶
func (mdsMock *MockedMDS) GetMessages(log log.T, instanceID string) (messages *ssmmds.GetMessagesOutput, err error)
GetMessages mocks the service function with the same name.
type MockedPluginRunner ¶
MockedPluginRunner stands for a mock plugin runner.
func (*MockedPluginRunner) RunPlugins ¶
func (runnerMock *MockedPluginRunner) RunPlugins(context context.T, documentID string, plugins []docModel.PluginState, sendResponse runpluginutil.SendResponse, cancelFlag task.CancelFlag) (pluginOutputs map[string]*contracts.PluginResult)
RunPlugins mocks a PluginRunner (which is a func).
type MockedReplyBuilder ¶
MockedReplyBuilder stands for a mock reply builder.
func (*MockedReplyBuilder) BuildReply ¶
func (replyBuilderMock *MockedReplyBuilder) BuildReply(pluginID string, pluginResults map[string]*contracts.PluginResult) model.SendReplyPayload
BuildReply mocks a ReplyBuilder (which is a func).
type MockedSendResponse ¶
MockedSendResponse stands for a mock send response.
func (*MockedSendResponse) SendResponse ¶
func (sendResponseMock *MockedSendResponse) SendResponse(messageID string, pluginID string, results map[string]*contracts.PluginResult)
SendResponse mocks a SendResponse (which is a func).
type PluginRunner ¶
type PluginRunner func(context context.T, documentID string, plugins []model.PluginState, sendResponse runpluginutil.SendResponse, cancelFlag task.CancelFlag) (pluginOutputs map[string]*contracts.PluginResult)
PluginRunner is a function that can run a set of plugins and return their outputs.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor is an object that can process MDS messages.
func NewMdsProcessor ¶
NewMdsProcessor initializes a new mds processor with the given parameters.
func NewOfflineProcessor ¶
NewOfflineProcessor initialize a new offline command document processor
func NewProcessor ¶
func NewProcessor(context context.T, processorName string, processorService service.Service, commandWorkerLimit int, cancelWorkerLimit int, pollAssoc bool, supportedDocs []model.DocumentType) *Processor
NewProcessor performs common initialization for Mds and Offline processors
func (*Processor) ExecutePendingDocument ¶
func (p *Processor) ExecutePendingDocument(docState *model.DocumentState)
submitDocForExecution moves doc to current folder and submit it for execution
func (*Processor) ModuleExecute ¶
Execute starts the scheduling of the message processor plugin
type TopicPrefix ¶
type TopicPrefix string
TopicPrefix is the prefix of the Topic field in an MDS message.
const ( // SendCommandTopicPrefix is the topic prefix for a send command MDS message. SendCommandTopicPrefix TopicPrefix = "aws.ssm.sendCommand." // CancelCommandTopicPrefix is the topic prefix for a cancel command MDS message. CancelCommandTopicPrefix TopicPrefix = "aws.ssm.cancelCommand." // SendCommandTopicPrefixOffline is the topic prefix for a send command MDS message received from the offline service. SendCommandTopicPrefixOffline TopicPrefix = "aws.ssm.sendCommand.offline." // CancelCommandTopicPrefix is the topic prefix for a cancel command MDS message received from the offline service. CancelCommandTopicPrefixOffline TopicPrefix = "aws.ssm.cancelCommand.offline." CancelWorkersLimit = 3 )