Documentation ¶
Overview ¶
Package replytypes will be responsible for handling agent run command reply type from the processor
Package replytypes will be responsible for handling various replies received from the processor ¶
Package replytypes will be responsible for handling session complete replies received from the processor
Index ¶
- type AgentRunCommandReplyType
- func (ad *AgentRunCommandReplyType) ConvertToAgentMessage() (*mgsContracts.AgentMessage, error)
- func (ad *AgentRunCommandReplyType) GetBackOffSecond() int
- func (ad *AgentRunCommandReplyType) GetMessageUUID() uuid.UUID
- func (ad *AgentRunCommandReplyType) GetName() contracts.ResultType
- func (ad *AgentRunCommandReplyType) GetNumberOfContinuousRetries() int
- func (ad *AgentRunCommandReplyType) GetResult() contracts.DocumentResult
- func (ad *AgentRunCommandReplyType) GetRetryNumber() int
- func (ad *AgentRunCommandReplyType) IncrementRetries() int
- func (ad *AgentRunCommandReplyType) ShouldPersistData() bool
- type IReplyType
- func GetReplyTypeObject(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, ...) (IReplyType, error)
- func NewAgentRunCommandReplyType(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, ...) IReplyType
- func NewSessionCompleteType(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, ...) IReplyType
- type ReplyTypeGenerator
- type SessionCompleteReplyType
- func (srt *SessionCompleteReplyType) ConvertToAgentMessage() (*mgsContracts.AgentMessage, error)
- func (srt *SessionCompleteReplyType) GetBackOffSecond() int
- func (srt *SessionCompleteReplyType) GetMessageUUID() uuid.UUID
- func (srt *SessionCompleteReplyType) GetName() contracts.ResultType
- func (srt *SessionCompleteReplyType) GetNumberOfContinuousRetries() int
- func (srt *SessionCompleteReplyType) GetResult() contracts.DocumentResult
- func (srt *SessionCompleteReplyType) GetRetryNumber() int
- func (srt *SessionCompleteReplyType) IncrementRetries() int
- func (srt *SessionCompleteReplyType) ShouldPersistData() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRunCommandReplyType ¶
type AgentRunCommandReplyType struct {
// contains filtered or unexported fields
}
AgentRunCommandReplyType defines methods and properties to handle RunCommandResult
func (*AgentRunCommandReplyType) ConvertToAgentMessage ¶
func (ad *AgentRunCommandReplyType) ConvertToAgentMessage() (*mgsContracts.AgentMessage, error)
ConvertToAgentMessage converts result to agent message
func (*AgentRunCommandReplyType) GetBackOffSecond ¶
func (ad *AgentRunCommandReplyType) GetBackOffSecond() int
GetBackOffSecond returns the backoff time to wait till the agent
func (*AgentRunCommandReplyType) GetMessageUUID ¶
func (ad *AgentRunCommandReplyType) GetMessageUUID() uuid.UUID
GetMessageUUID returns message UUID used for logging and persistence in the interactors
func (*AgentRunCommandReplyType) GetName ¶
func (ad *AgentRunCommandReplyType) GetName() contracts.ResultType
GetName return name of the reply type
func (*AgentRunCommandReplyType) GetNumberOfContinuousRetries ¶
func (ad *AgentRunCommandReplyType) GetNumberOfContinuousRetries() int
GetNumberOfContinuousRetries represents the number of continuous retries needed during send reply failure After continuous retries, the result will be saved in the local disk if persist enabled.
func (*AgentRunCommandReplyType) GetResult ¶
func (ad *AgentRunCommandReplyType) GetResult() contracts.DocumentResult
GetResult get agent result
func (*AgentRunCommandReplyType) GetRetryNumber ¶
func (ad *AgentRunCommandReplyType) GetRetryNumber() int
GetRetryNumber denotes how many times the message was retried sending this includes only continuous retries
func (*AgentRunCommandReplyType) IncrementRetries ¶
func (ad *AgentRunCommandReplyType) IncrementRetries() int
IncrementRetries increment retry number
func (*AgentRunCommandReplyType) ShouldPersistData ¶
func (ad *AgentRunCommandReplyType) ShouldPersistData() bool
ShouldPersistData denotes whether the reply should be persisted
type IReplyType ¶
type IReplyType interface { GetName() contracts.ResultType ConvertToAgentMessage() (*mgsContracts.AgentMessage, error) GetMessageUUID() uuid.UUID GetRetryNumber() int GetNumberOfContinuousRetries() int ShouldPersistData() bool GetBackOffSecond() int IncrementRetries() int GetResult() contracts.DocumentResult }
IReplyType is interface implemented by replytyes
func GetReplyTypeObject ¶
func GetReplyTypeObject(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, retryNumber int) (IReplyType, error)
GetReplyTypeObject returns the replytype object based on the reply type from the result
func NewAgentRunCommandReplyType ¶
func NewAgentRunCommandReplyType(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, retryNumber int) IReplyType
NewAgentRunCommandReplyType returns new Agent Run Command reply type
func NewSessionCompleteType ¶
func NewSessionCompleteType(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, retryNumber int) IReplyType
NewSessionCompleteType returns new session complete reply type
type ReplyTypeGenerator ¶
type ReplyTypeGenerator func(ctx context.T, res contracts.DocumentResult, replyId uuid.UUID, retryNumber int) IReplyType
type SessionCompleteReplyType ¶
type SessionCompleteReplyType struct {
// contains filtered or unexported fields
}
SessionCompleteReplyType defines methods and properties to handle the AgentComplete reply
func (*SessionCompleteReplyType) ConvertToAgentMessage ¶
func (srt *SessionCompleteReplyType) ConvertToAgentMessage() (*mgsContracts.AgentMessage, error)
ConvertToAgentMessage converts result to agent message
func (*SessionCompleteReplyType) GetBackOffSecond ¶
func (srt *SessionCompleteReplyType) GetBackOffSecond() int
GetBackOffSecond returns the backoff time to wait till the agent
func (*SessionCompleteReplyType) GetMessageUUID ¶
func (srt *SessionCompleteReplyType) GetMessageUUID() uuid.UUID
GetMessageUUID returns message UUID used for logging and persistence in the intercators
func (*SessionCompleteReplyType) GetName ¶
func (srt *SessionCompleteReplyType) GetName() contracts.ResultType
GetName return name of the reply type
func (*SessionCompleteReplyType) GetNumberOfContinuousRetries ¶
func (srt *SessionCompleteReplyType) GetNumberOfContinuousRetries() int
GetNumberOfContinuousRetries represents the number of continuous retries needed during send reply failure After continuous retries, the result will be saved in the local disk if persist enabled.
func (*SessionCompleteReplyType) GetResult ¶
func (srt *SessionCompleteReplyType) GetResult() contracts.DocumentResult
GetResult get agent result
func (*SessionCompleteReplyType) GetRetryNumber ¶
func (srt *SessionCompleteReplyType) GetRetryNumber() int
GetRetryNumber denotes how many times the message was retried sending this includes only continuous retries
func (*SessionCompleteReplyType) IncrementRetries ¶
func (srt *SessionCompleteReplyType) IncrementRetries() int
IncrementRetries increment retry number
func (*SessionCompleteReplyType) ShouldPersistData ¶
func (srt *SessionCompleteReplyType) ShouldPersistData() bool
ShouldPersistData denotes whether the reply should be persisted