forked from Azure/go-amqp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
90 lines (71 loc) · 2.63 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package amqp
import "github.com/Azure/go-amqp/internal/encoding"
// Sender Settlement Modes
const (
// Sender will send all deliveries initially unsettled to the receiver.
ModeUnsettled = encoding.ModeUnsettled
// Sender will send all deliveries settled to the receiver.
ModeSettled = encoding.ModeSettled
// Sender MAY send a mixture of settled and unsettled deliveries to the receiver.
ModeMixed = encoding.ModeMixed
)
// SenderSettleMode specifies how the sender will settle messages.
type SenderSettleMode = encoding.SenderSettleMode
func senderSettleModeValue(m *SenderSettleMode) SenderSettleMode {
if m == nil {
return ModeMixed
}
return *m
}
// Receiver Settlement Modes
const (
// Receiver will spontaneously settle all incoming transfers.
ModeFirst = encoding.ModeFirst
// Receiver will only settle after sending the disposition to the
// sender and receiving a disposition indicating settlement of
// the delivery from the sender.
ModeSecond = encoding.ModeSecond
)
// ReceiverSettleMode specifies how the receiver will settle messages.
type ReceiverSettleMode = encoding.ReceiverSettleMode
func receiverSettleModeValue(m *ReceiverSettleMode) ReceiverSettleMode {
if m == nil {
return ModeFirst
}
return *m
}
// Durability Policies
const (
// No terminus state is retained durably.
DurabilityNone = encoding.DurabilityNone
// Only the existence and configuration of the terminus is
// retained durably.
DurabilityConfiguration = encoding.DurabilityConfiguration
// In addition to the existence and configuration of the
// terminus, the unsettled state for durable messages is
// retained durably.
DurabilityUnsettledState = encoding.DurabilityUnsettledState
)
// Durability specifies the durability of a link.
type Durability = encoding.Durability
// Expiry Policies
const (
// The expiry timer starts when terminus is detached.
ExpiryLinkDetach = encoding.ExpiryLinkDetach
// The expiry timer starts when the most recently
// associated session is ended.
ExpirySessionEnd = encoding.ExpirySessionEnd
// The expiry timer starts when most recently associated
// connection is closed.
ExpiryConnectionClose = encoding.ExpiryConnectionClose
// The terminus never expires.
ExpiryNever = encoding.ExpiryNever
)
// ExpiryPolicy specifies when the expiry timer of a terminus
// starts counting down from the timeout value.
//
// If the link is subsequently re-attached before the terminus is expired,
// then the count down is aborted. If the conditions for the
// terminus-expiry-policy are subsequently re-met, the expiry timer restarts
// from its originally configured timeout value.
type ExpiryPolicy = encoding.ExpiryPolicy