replytypes

package
v0.0.0-...-0117b6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

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

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

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL