response

package
v0.0.1-0...-a0864a0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ACK = Response{
	Error:  nil,
	Ack:    true,
	AckErr: nil,
}

ACK A Successful Ack

Functions

This section is empty.

Types

type Response

type Response struct {
	// Error is a non-nil error if the payload failed to process due to an *internal* error.
	Error error

	// Ack indicates that - even though there may not have been an error in
	// processing the payload -, it should not be acknowledged.
	Ack bool

	// AckErr is why the
	AckErr error
}

Response indicate whether the payload was successfully processed and propagated to the next destinations.

func Ack

func Ack() Response

Ack returns A Successful Ack response

func Error

func Error(err error) Response

Error Return a no-ack response that indicated an *internal* error due to a failure.

func NoAck

func NoAck(reason error) Response

NoAck Return a no-ack response that indicates that the message should be not-acknowledged, not due to a failure. reason describes *why* the message was not-acknowledged.

Jump to

Keyboard shortcuts

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