service

package
v0.0.0-...-7638cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

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

This section is empty.

Types

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 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
	FailMessage(log log.T, messageID string, failureType FailureType) error
	DeleteMessage(log log.T, messageID string) error
	Stop()
}

Service is an interface to the MDS 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(region string, endpoint string, creds *credentials.Credentials, 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