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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
|
/* Copyright 2017 LinkedIn Corp. Licensed under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package httpserver
import "github.com/linkedin/Burrow/core/protocol"
type logLevelRequest struct {
Level string `json:"level"`
}
type httpResponseLogLevel struct {
Error bool `json:"error"`
Message string `json:"message"`
Level string `json:"level"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseRequestInfo struct {
URI string `json:"url"`
Host string `json:"host"`
}
type httpResponseError struct {
Error bool `json:"error"`
Message string `json:"message"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseTLSProfile struct {
Name string `json:"name"`
NoVerify bool `json:"noverify"`
CertFile string `json:"certfile"`
KeyFile string `json:"keyfile"`
CAFile string `json:"cafile"`
}
type httpResponseSASLProfile struct {
Name string `json:"name"`
HandshakeFirst bool `json:"handshake-first"`
Username string `json:"username"`
}
type httpResponseClientProfile struct {
Name string `json:"name"`
ClientID string `json:"client-id"`
KafkaVersion string `json:"kafka-version"`
TLS *httpResponseTLSProfile `json:"tls"`
SASL *httpResponseSASLProfile `json:"sasl"`
}
type httpResponseClusterList struct {
Error bool `json:"error"`
Message string `json:"message"`
Clusters []string `json:"clusters"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseTopicList struct {
Error bool `json:"error"`
Message string `json:"message"`
Topics []string `json:"topics"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseTopicDetail struct {
Error bool `json:"error"`
Message string `json:"message"`
Offsets []int64 `json:"offsets"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseTopicConsumerDetail struct {
Error bool `json:"error"`
Message string `json:"message"`
Consumers []string `json:"consumers"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseConsumerList struct {
Error bool `json:"error"`
Message string `json:"message"`
Consumers []string `json:"consumers"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseConsumerDetail struct {
Error bool `json:"error"`
Message string `json:"message"`
Topics protocol.ConsumerTopics `json:"topics"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseConsumerStatus struct {
Error bool `json:"error"`
Message string `json:"message"`
Status protocol.ConsumerGroupStatus `json:"status"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseConfigGeneral struct {
PIDFile string `json:"pidfile"`
StdoutLogfile string `json:"stdout-logfile"`
AccessControlAllowOrigin string `json:"access-control-allow-origin"`
}
type httpResponseConfigLogging struct {
Filename string `json:"filename"`
MaxSize int `json:"max-size"`
MaxBackups int `json:"max-backups"`
MaxAge int `json:"max-age"`
UseLocalTime bool `json:"use-local-time"`
UseCompression bool `json:"use-compression"`
Level string `json:"level"`
}
type httpResponseConfigZookeeper struct {
Servers []string `json:"servers"`
Timeout int `json:"timeout"`
RootPath string `json:"root-path"`
}
type httpResponseConfigHTTPServer struct {
Address string `json:"address"`
TLS string `json:"tls"`
Timeout int `json:"timeout"`
}
type httpResponseConfigMain struct {
Error bool `json:"error"`
Message string `json:"message"`
Request httpResponseRequestInfo `json:"request"`
General httpResponseConfigGeneral `json:"general"`
Logging httpResponseConfigLogging `json:"logging"`
Zookeeper httpResponseConfigZookeeper `json:"zookeeper"`
HTTPServer map[string]httpResponseConfigHTTPServer `json:"httpserver"`
}
type httpResponseConfigModuleList struct {
Error bool `json:"error"`
Message string `json:"message"`
Request httpResponseRequestInfo `json:"request"`
Coordinator string `json:"coordinator"`
Modules []string `json:"modules"`
}
type httpResponseConfigModuleDetail struct {
Error bool `json:"error"`
Message string `json:"message"`
Module interface{} `json:"module"`
Request httpResponseRequestInfo `json:"request"`
}
type httpResponseConfigModuleStorage struct {
ClassName string `json:"class-name"`
Intervals int `json:"intervals"`
MinDistance int64 `json:"min-distance"`
GroupWhitelist string `json:"group-whitelist"`
ExpireGroup int64 `json:"expire-group"`
}
type httpResponseConfigModuleCluster struct {
ClassName string `json:"class-name"`
Servers []string `json:"servers"`
ClientProfile httpResponseClientProfile `json:"client-profile"`
TopicRefresh int64 `json:"topic-refresh"`
OffsetRefresh int64 `json:"offset-refresh"`
}
type httpResponseConfigModuleConsumer struct {
ClassName string `json:"class-name"`
Cluster string `json:"cluster"`
Servers []string `json:"servers"`
GroupWhitelist string `json:"group-whitelist"`
ZookeeperPath string `json:"zookeeper-path"`
ZookeeperTimeout int32 `json:"zookeeper-timeout"`
ClientProfile httpResponseClientProfile `json:"client-profile"`
OffsetsTopic string `json:"offsets-topic"`
StartLatest bool `json:"start-latest"`
}
type httpResponseConfigModuleEvaluator struct {
ClassName string `json:"class-name"`
ExpireCache int64 `json:"expire-cache"`
}
type httpResponseConfigModuleNotifierHTTP struct {
ClassName string `json:"class-name"`
GroupWhitelist string `json:"group-whitelist"`
Interval int64 `json:"interval"`
Threshold int `json:"threshold"`
Timeout int `json:"timeout"`
Keepalive int `json:"keepalive"`
URLOpen string `json:"url-open"`
URLClose string `json:"url-close"`
MethodOpen string `json:"method-open"`
MethodClose string `json:"method-close"`
TemplateOpen string `json:"template-open"`
TemplateClose string `json:"template-close"`
Extras map[string]string `json:"extra"`
SendClose bool `json:"send-close"`
}
type httpResponseConfigModuleNotifierSlack struct {
ClassName string `json:"class-name"`
GroupWhitelist string `json:"group-whitelist"`
Interval int64 `json:"interval"`
Threshold int `json:"threshold"`
Timeout int `json:"timeout"`
Keepalive int `json:"keepalive"`
TemplateOpen string `json:"template-open"`
TemplateClose string `json:"template-close"`
Extras map[string]string `json:"extra"`
SendClose bool `json:"send-close"`
Channel string `json:"channel"`
Username string `json:"username"`
IconURL string `json:"icon-url"`
IconEmoji string `json:"icon-emoji"`
}
type httpResponseConfigModuleNotifierEmail struct {
ClassName string `json:"class-name"`
GroupWhitelist string `json:"group-whitelist"`
Interval int64 `json:"interval"`
Threshold int `json:"threshold"`
TemplateOpen string `json:"template-open"`
TemplateClose string `json:"template-close"`
Extras map[string]string `json:"extra"`
SendClose bool `json:"send-close"`
Server string `json:"server"`
Port int `json:"port"`
AuthType string `json:"auth-type"`
Username string `json:"username"`
From string `json:"from"`
To string `json:"to"`
}
type httpResponseConfigModuleNotifierNull struct {
ClassName string `json:"class-name"`
GroupWhitelist string `json:"group-whitelist"`
Interval int64 `json:"interval"`
Threshold int `json:"threshold"`
TemplateOpen string `json:"template-open"`
TemplateClose string `json:"template-close"`
Extras map[string]string `json:"extra"`
SendClose bool `json:"send-close"`
}
|