-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstruct.go
33 lines (29 loc) · 1.03 KB
/
struct.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
package jazz
// Exchange is structure with specification of properties of RabbitMQ exchange
type Exchange struct {
Durable bool `yaml:"durable"`
Autodelete bool `yaml:"autodelete"`
Internal bool `yaml:"internal"`
Nowait bool `yaml:"nowait"`
Type string `yaml:"type"`
Bindings []Binding `yaml:"bindings"`
}
// Binding specifies to which exchange should be an exchange or a queue binded
type Binding struct {
Exchange string `yaml:"exchange"`
Key string `yaml:"key"`
Nowait bool `yaml:"nowait"`
}
// QueueSpec is a specification of properties of RabbitMQ queue
type QueueSpec struct {
Durable bool `yaml:"durable"`
Autodelete bool `yaml:"autodelete"`
Nowait bool `yaml:"nowait"`
Exclusive bool `yaml:"exclusive"`
Bindings []Binding `yaml:"bindings"`
}
// Settings is a specification of all queues and exchanges together with all bindings.
type Settings struct {
Exchanges map[string]Exchange `yaml:"exchanges"`
Queues map[string]QueueSpec `yaml:"queues"`
}