forked from kubemq-io/kubemq-sources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnector.go
97 lines (95 loc) · 2.27 KB
/
connector.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
91
92
93
94
95
96
97
package rabbitmq
import "github.com/kubemq-hub/builder/connector/common"
func Connector() *common.Connector {
return common.NewConnector().
SetKind("messaging.rabbitmq").
SetDescription("RabbitMQ source properties").
SetName("RabbitMQ").
SetProvider("").
SetCategory("Messaging").
SetTags("queue", "pub/sub").
AddProperty(
common.NewProperty().
SetKind("string").
SetName("url").
SetTitle("URL Address").
SetDescription("Set RabbitMQ connection string").
SetMust(true),
).
AddProperty(
common.NewProperty().
SetKind("multilines").
SetName("ca_cert").
SetDescription("Set TLS CA Certificate").
SetMust(false).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("multilines").
SetName("client_certificate").
SetDescription("Set TLS Client PEM data").
SetMust(false).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("multilines").
SetName("client_key").
SetDescription("Set TLS Client Key PEM data").
SetMust(false).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("queue").
SetTitle("Queue Name").
SetDescription("Set queue name").
SetMust(true).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("bool").
SetName("dynamic_mapping").
SetDescription("Set Queue/Channel dynamic mapping").
SetMust(false).
SetDefault("false"),
).
AddProperty(
common.NewProperty().
SetKind("string").
SetName("consumer").
SetTitle("Consumer ID").
SetDescription("Set consumer tag value").
SetMust(false).
SetDefault(""),
).
AddProperty(
common.NewProperty().
SetKind("bool").
SetName("requeue_on_error").
SetTitle("Requeue on Error").
SetDescription("Set requeue message on error").
SetMust(false).
SetDefault("false"),
).
AddProperty(
common.NewProperty().
SetKind("bool").
SetName("auto_ack").
SetTitle("Automatic Ack").
SetDescription("Set auto ack upon receive message").
SetMust(false).
SetDefault("false"),
).
AddProperty(
common.NewProperty().
SetKind("bool").
SetName("exclusive").
SetDescription("Set exclusive subscription").
SetMust(false).
SetDefault("false"),
)
}