-
Notifications
You must be signed in to change notification settings - Fork 0
/
structures.go
142 lines (138 loc) · 6.71 KB
/
structures.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
package kafka_manager_exporter
type APIClusters struct {
Clusters struct {
Active []struct {
Name string `json:"name"`
CuratorConfig struct {
ZkConnect string `json:"zkConnect"`
ZkMaxRetry int `json:"zkMaxRetry"`
BaseSleepTimeMs int `json:"baseSleepTimeMs"`
MaxSleepTimeMs int `json:"maxSleepTimeMs"`
} `json:"curatorConfig"`
Enabled bool `json:"enabled"`
Version struct {
} `json:"version"`
JmxEnabled bool `json:"jmxEnabled"`
JmxSsl bool `json:"jmxSsl"`
PollConsumers bool `json:"pollConsumers"`
FilterConsumers bool `json:"filterConsumers"`
LogkafkaEnabled bool `json:"logkafkaEnabled"`
ActiveOffsetCacheEnabled bool `json:"activeOffsetCacheEnabled"`
DisplaySizeEnabled bool `json:"displaySizeEnabled"`
Tuning struct {
BrokerViewUpdatePeriodSeconds int `json:"brokerViewUpdatePeriodSeconds"`
ClusterManagerThreadPoolSize int `json:"clusterManagerThreadPoolSize"`
ClusterManagerThreadPoolQueueSize int `json:"clusterManagerThreadPoolQueueSize"`
KafkaCommandThreadPoolSize int `json:"kafkaCommandThreadPoolSize"`
KafkaCommandThreadPoolQueueSize int `json:"kafkaCommandThreadPoolQueueSize"`
LogkafkaCommandThreadPoolSize int `json:"logkafkaCommandThreadPoolSize"`
LogkafkaCommandThreadPoolQueueSize int `json:"logkafkaCommandThreadPoolQueueSize"`
LogkafkaUpdatePeriodSeconds int `json:"logkafkaUpdatePeriodSeconds"`
PartitionOffsetCacheTimeoutSecs int `json:"partitionOffsetCacheTimeoutSecs"`
BrokerViewThreadPoolSize int `json:"brokerViewThreadPoolSize"`
BrokerViewThreadPoolQueueSize int `json:"brokerViewThreadPoolQueueSize"`
OffsetCacheThreadPoolSize int `json:"offsetCacheThreadPoolSize"`
OffsetCacheThreadPoolQueueSize int `json:"offsetCacheThreadPoolQueueSize"`
KafkaAdminClientThreadPoolSize int `json:"kafkaAdminClientThreadPoolSize"`
KafkaAdminClientThreadPoolQueueSize int `json:"kafkaAdminClientThreadPoolQueueSize"`
} `json:"tuning"`
SecurityProtocol struct {
} `json:"securityProtocol"`
} `json:"active"`
Pending []interface{} `json:"pending"`
} `json:"clusters"`
}
type APITopicIdentities struct {
TopicIdentities []struct {
Topic string `json:"topic"`
ReadVersion int `json:"readVersion"`
Partitions int `json:"partitions"`
PartitionsIdentity []struct {
PartNum int `json:"partNum"`
Leader int `json:"leader"`
LatestOffset int `json:"latestOffset"`
RateOfChange float64 `json:"rateOfChange"`
Isr []int `json:"isr"`
Replicas []int `json:"replicas"`
IsPreferredLeader bool `json:"isPreferredLeader"`
IsUnderReplicated bool `json:"isUnderReplicated"`
} `json:"partitionsIdentity"`
NumBrokers int `json:"numBrokers"`
ConfigReadVersion int `json:"configReadVersion"`
Config [][]string `json:"config"`
ClusterContext struct {
ClusterFeatures struct {
Features []struct {
} `json:"features"`
} `json:"clusterFeatures"`
Config struct {
Name string `json:"name"`
CuratorConfig struct {
ZkConnect string `json:"zkConnect"`
ZkMaxRetry int `json:"zkMaxRetry"`
BaseSleepTimeMs int `json:"baseSleepTimeMs"`
MaxSleepTimeMs int `json:"maxSleepTimeMs"`
} `json:"curatorConfig"`
Enabled bool `json:"enabled"`
Version struct {
} `json:"version"`
JmxEnabled bool `json:"jmxEnabled"`
JmxSsl bool `json:"jmxSsl"`
PollConsumers bool `json:"pollConsumers"`
FilterConsumers bool `json:"filterConsumers"`
LogkafkaEnabled bool `json:"logkafkaEnabled"`
ActiveOffsetCacheEnabled bool `json:"activeOffsetCacheEnabled"`
DisplaySizeEnabled bool `json:"displaySizeEnabled"`
Tuning struct {
BrokerViewUpdatePeriodSeconds int `json:"brokerViewUpdatePeriodSeconds"`
ClusterManagerThreadPoolSize int `json:"clusterManagerThreadPoolSize"`
ClusterManagerThreadPoolQueueSize int `json:"clusterManagerThreadPoolQueueSize"`
KafkaCommandThreadPoolSize int `json:"kafkaCommandThreadPoolSize"`
KafkaCommandThreadPoolQueueSize int `json:"kafkaCommandThreadPoolQueueSize"`
LogkafkaCommandThreadPoolSize int `json:"logkafkaCommandThreadPoolSize"`
LogkafkaCommandThreadPoolQueueSize int `json:"logkafkaCommandThreadPoolQueueSize"`
LogkafkaUpdatePeriodSeconds int `json:"logkafkaUpdatePeriodSeconds"`
PartitionOffsetCacheTimeoutSecs int `json:"partitionOffsetCacheTimeoutSecs"`
BrokerViewThreadPoolSize int `json:"brokerViewThreadPoolSize"`
BrokerViewThreadPoolQueueSize int `json:"brokerViewThreadPoolQueueSize"`
OffsetCacheThreadPoolSize int `json:"offsetCacheThreadPoolSize"`
OffsetCacheThreadPoolQueueSize int `json:"offsetCacheThreadPoolQueueSize"`
KafkaAdminClientThreadPoolSize int `json:"kafkaAdminClientThreadPoolSize"`
KafkaAdminClientThreadPoolQueueSize int `json:"kafkaAdminClientThreadPoolQueueSize"`
} `json:"tuning"`
SecurityProtocol struct {
} `json:"securityProtocol"`
} `json:"config"`
} `json:"clusterContext"`
Size interface{} `json:"size"`
ReplicationFactor int `json:"replicationFactor"`
PartitionsByBroker []struct {
ID int `json:"id"`
Partitions []int `json:"partitions"`
IsSkewed bool `json:"isSkewed"`
Leaders []int `json:"leaders"`
IsLeaderSkewed bool `json:"isLeaderSkewed"`
} `json:"partitionsByBroker"`
SummedTopicOffsets int64 `json:"summedTopicOffsets"`
PreferredReplicasPercentage int `json:"preferredReplicasPercentage"`
UnderReplicatedPercentage int `json:"underReplicatedPercentage"`
TopicBrokers int `json:"topicBrokers"`
BrokersSkewPercentage int `json:"brokersSkewPercentage"`
BrokersSpreadPercentage int `json:"brokersSpreadPercentage"`
ProducerRate string `json:"producerRate"`
} `json:"topicIdentities"`
}
type APITopicSummary struct {
TotalLag int64 `json:"totalLag"`
PercentageCovered int `json:"percentageCovered"`
PartitionOffsets []int64 `json:"partitionOffsets"`
PartitionLatestOffsets []int64 `json:"partitionLatestOffsets"`
Owners []string `json:"owners"`
}
type APIConsumers struct {
Consumers []struct {
Name string `json:"name"`
Type string `json:"type"`
Topics []string `json:"topics"`
} `json:"consumers"`
}