-
Notifications
You must be signed in to change notification settings - Fork 1
/
constant.go
69 lines (59 loc) · 1.89 KB
/
constant.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
package rabbitmqclient
import "github.com/fairyhunter13/amqpwrapper"
// List of all uint constants for boolean
const (
FalseUint uint64 = iota
TrueUint
)
// List of default config used for this library.
const (
// prefixes
DefaultPrefixExchange = "amqp."
DefaultPrefixQueue = "queue."
DefaultPrefixConsumer = "consumer."
DefaultQueue = "default"
DefaultTopic = "default"
DefaultChannelKey = "default"
)
// List of default variable configuration for this library
var (
DefaultExchange = GenerateExchangeName(true, TypeDirect)
)
const (
// DefaultKeyInitiator sets the key channel for the initiator of topology in the producer connection.
DefaultKeyInitiator = "initiator"
// DefaultKeyProducer specifies the key channel for producer.
DefaultKeyProducer = "producer.%d"
)
// List of channel types for amqpwrapper
const (
// DefaultTypeProducer specifies the default type of channel for the amqpwrapper.
DefaultTypeProducer = amqpwrapper.Producer
// DefaultTypeConsumer specifies the default type of channel for the amqpwrapper.
DefaultTypeConsumer = amqpwrapper.Consumer
)
// List of all exchange type in rabbitmq
const (
TypeDirect = `direct`
TypeFanout = `fanout`
TypeTopic = `topic`
TypeHeaders = `headers`
)
// List of all delivery modes for amqp rabbitmqclient
const (
DeliveryModeTransient = 1
DeliveryModePersistent = 2
)
// List of all topology constants
const (
TopologyExchangeDeclare = `ExchangeDeclare`
TopologyExchangeDeclarePassive = `ExchangeDeclarePassive`
TopologyExchangeBind = `ExchangeBind`
TopologyExchangeUnbind = `ExchangeUnbind`
TopologyExchangeDelete = `ExchangeDelete`
TopologyQueueDeclare = `QueueDeclare`
TopologyQueueDeclarePassive = `QueueDeclarePassive`
TopologyQueueBind = `QueueBind`
TopologyQueueUnbind = `QueueUnbind`
TopologyQueueDelete = `QueueDelete`
)