service

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 28 Imported by: 6

Documentation

Overview

Package service is a wrapper for the SSM Message Delivery Service and Offline Command Service

Package service is a wrapper for the SSM Message Delivery Service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFailedReplyDirectory

func GetFailedReplyDirectory(identity identity.IAgentIdentity) string

GetFailedReplyDirectory returns path to replies folder

Types

type CancelSdkRequest

type CancelSdkRequest func(trans *http.Transport, req *request.Request)

type FailureType

type FailureType string

FailureType is used for failure types.

const (
	// InternalHandlerException signifies an error while running a plugin.
	InternalHandlerException FailureType = "InternalHandlerException"

	// NoHandlerExists signifies that there is no plugin for a given name.
	NoHandlerExists FailureType = "NoHandlerExists"

	// QuickResponseThreshold is the threshold time - any api response that comes before this (time in seconds) is treated as fast response
	QuickResponseThreshold = 10
)

type SendSdkRequest

type SendSdkRequest func(req *request.Request) error

type Service

type Service interface {
	GetMessages(log log.T, instanceID string) (messages *ssmmds.GetMessagesOutput, err error)
	AcknowledgeMessage(log log.T, messageID string) error
	SendReply(log log.T, messageID string, payload string) error
	SendReplyWithInput(log log.T, sendReply *ssmmds.SendReplyInput) error
	FailMessage(log log.T, messageID string, failureType FailureType) error
	DeleteMessage(log log.T, messageID string) error
	LoadFailedReplies(log log.T) []string
	DeleteFailedReply(log log.T, replyId string)
	PersistFailedReply(log log.T, sendReply ssmmds.SendReplyInput) error
	GetFailedReply(log log.T, replyId string) (*ssmmds.SendReplyInput, error)
	Stop()
}

Service is an interface to the MDS service.

func NewMdsSdkService

func NewMdsSdkService(context context.T, msgSvc ssmmdsiface.SsmmdsAPI, tr *http.Transport, sendMdsSdkRequest SendSdkRequest, cancelMdsSDKRequest CancelSdkRequest) Service

func NewOfflineService

func NewOfflineService(log log.T, topicPrefix string) (Service, error)

NewOfflineService initializes a service that looks for work in a local command folder

func NewService

func NewService(context context.T, connectionTimeout time.Duration) Service

NewService creates a new MDS service instance.

Jump to

Keyboard shortcuts

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