callback

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateErrorCode

func TranslateErrorCode(errorCode string) string

TranslateErrorCode : Translate the error code into a standard Cloudformation error

func TranslateOperationStatus

func TranslateOperationStatus(operationStatus Status) string

TranslateOperationStatus Translate the operation Status into a standard Cloudformation error

Types

type CloudFormationCallbackAdapter

type CloudFormationCallbackAdapter struct {
	// contains filtered or unexported fields
}

CloudFormationCallbackAdapter used to report progress events back to CloudFormation.

func New

New creates a CloudFormationCallbackAdapter and returns a pointer to the struct.

func (*CloudFormationCallbackAdapter) ReportFailureStatus

func (c *CloudFormationCallbackAdapter) ReportFailureStatus(model []byte, errCode string, handlerError error) error

ReportFailureStatus reports the failure status back to the Cloudformation service.

func (*CloudFormationCallbackAdapter) ReportInitialStatus

func (c *CloudFormationCallbackAdapter) ReportInitialStatus() error

ReportInitialStatus reports the initial status back to the Cloudformation service.

func (*CloudFormationCallbackAdapter) ReportStatus

func (c *CloudFormationCallbackAdapter) ReportStatus(operationStatus Status, model []byte, message string, errCode string) error

ReportStatus reports the status back to the Cloudformation service of a handler that has moved from Pending to In_Progress

type Status

type Status string

Status represents the status of the handler during invocation.

const (
	// UnknownStatus represents all states that aren't covered
	// elsewhere.
	UnknownStatus Status = "UNKNOWN"

	// InProgress is when a resource provider
	// is in the process of being operated on.
	InProgress Status = "IN_PROGRESS"

	// Success is when the resource provider
	// has finished it's operation.
	Success Status = "SUCCESS"

	// Failed is when the resource provider
	// has failed.
	Failed Status = "FAILED"

	// Pending is the resource provider
	// initial state.
	Pending Status = "PENDING"
)

Jump to

Keyboard shortcuts

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