forked from vcabbage/amqp
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds method SendWithReceipt that's used to delay confirmation of message settlement and retrieval of the final delivery state. Moved DeliveryState interface and implementing types to exported_types.go as they're now public surface area. Implemented fmt.Stringer on StateReceived type. Slightly changed the value returned by String() on the other delivery types to use the type's full name
- Loading branch information
1 parent
907d06c
commit 2048490
Showing
7 changed files
with
570 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package amqp | ||
|
||
import "github.com/Azure/go-amqp/internal/encoding" | ||
|
||
// DeliveryState encapsulates the various concrete delivery states. | ||
// Use a type switch to determine the concrete delivery state. | ||
// - *StateAccepted | ||
// - *StateModified | ||
// - *StateReceived | ||
// - *StateRejected | ||
// - *StateReleased | ||
type DeliveryState = encoding.DeliveryState | ||
|
||
// StateAccepted indicates that an incoming message has been successfully processed, | ||
// and that the receiver of the message is expecting the sender to transition the | ||
// delivery to the accepted state at the source. | ||
type StateAccepted = encoding.StateAccepted | ||
|
||
// StateModifies indicates that a given transfer was not and will not be acted upon, | ||
// and that the message SHOULD be modified in the specified ways at the node. | ||
type StateModified = encoding.StateModified | ||
|
||
// StateReceived indicates the furthest point in the payload of the message which the | ||
// target will not need to have resent if the link is resumed. | ||
type StateReceived = encoding.StateReceived | ||
|
||
// StateRejected indicates that an incoming message is invalid and therefore unprocessable. | ||
// The rejected outcome when applied to a message will cause the delivery-count to be | ||
// incremented in the header of the rejected message. | ||
type StateRejected = encoding.StateRejected | ||
|
||
// StateReleased indicates that a given transfer was not and will not be acted upon. | ||
type StateReleased = encoding.StateReleased |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.