github.com/thanos-io/thanos@v0.32.5/pkg/rules/rulespb/rpc.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: rules/rulespb/rpc.proto 3 4 package rulespb 5 6 import ( 7 context "context" 8 encoding_binary "encoding/binary" 9 fmt "fmt" 10 11 _ "github.com/gogo/protobuf/gogoproto" 12 proto "github.com/gogo/protobuf/proto" 13 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status "google.golang.org/grpc/status" 17 18 io "io" 19 math "math" 20 math_bits "math/bits" 21 time "time" 22 23 labelpb "github.com/thanos-io/thanos/pkg/store/labelpb" 24 storepb "github.com/thanos-io/thanos/pkg/store/storepb" 25 ) 26 27 // Reference imports to suppress errors if they are not otherwise used. 28 var _ = proto.Marshal 29 var _ = fmt.Errorf 30 var _ = math.Inf 31 var _ = time.Kitchen 32 33 // This is a compile-time assertion to ensure that this generated file 34 // is compatible with the proto package it is being compiled against. 35 // A compilation error at this line likely means your copy of the 36 // proto package needs to be updated. 37 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 38 39 // / AlertState represents state of the alert. Has to match 1:1 Prometheus AlertState: 40 // 41 // StateInactive is the state of an alert that is neither firing nor pending. 42 // StateInactive AlertState = iota 43 // StatePending is the state of an alert that has been active for less than 44 // the configured threshold duration. 45 // StatePending 46 // StateFiring is the state of an alert that has been active for longer than 47 // the configured threshold duration. 48 // StateFiring 49 type AlertState int32 50 51 const ( 52 AlertState_INACTIVE AlertState = 0 53 AlertState_PENDING AlertState = 1 54 AlertState_FIRING AlertState = 2 55 ) 56 57 var AlertState_name = map[int32]string{ 58 0: "INACTIVE", 59 1: "PENDING", 60 2: "FIRING", 61 } 62 63 var AlertState_value = map[string]int32{ 64 "INACTIVE": 0, 65 "PENDING": 1, 66 "FIRING": 2, 67 } 68 69 func (x AlertState) String() string { 70 return proto.EnumName(AlertState_name, int32(x)) 71 } 72 73 func (AlertState) EnumDescriptor() ([]byte, []int) { 74 return fileDescriptor_91b1d28f30eb5efb, []int{0} 75 } 76 77 type RulesRequest_Type int32 78 79 const ( 80 RulesRequest_ALL RulesRequest_Type = 0 81 /// This will make sure strings.ToLower(.String()) will match 'alert' and 'record' values for 82 /// Prometheus HTTP API. 83 /// NOTE: The implementation has to return empty rule groups as well. 84 RulesRequest_ALERT RulesRequest_Type = 1 85 RulesRequest_RECORD RulesRequest_Type = 2 86 ) 87 88 var RulesRequest_Type_name = map[int32]string{ 89 0: "ALL", 90 1: "ALERT", 91 2: "RECORD", 92 } 93 94 var RulesRequest_Type_value = map[string]int32{ 95 "ALL": 0, 96 "ALERT": 1, 97 "RECORD": 2, 98 } 99 100 func (x RulesRequest_Type) String() string { 101 return proto.EnumName(RulesRequest_Type_name, int32(x)) 102 } 103 104 func (RulesRequest_Type) EnumDescriptor() ([]byte, []int) { 105 return fileDescriptor_91b1d28f30eb5efb, []int{0, 0} 106 } 107 108 type RulesRequest struct { 109 Type RulesRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=thanos.RulesRequest_Type" json:"type,omitempty"` 110 PartialResponseStrategy storepb.PartialResponseStrategy `protobuf:"varint,2,opt,name=partial_response_strategy,json=partialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partial_response_strategy,omitempty"` 111 MatcherString []string `protobuf:"bytes,3,rep,name=matcher_string,json=matcherString,proto3" json:"matcher_string,omitempty"` 112 } 113 114 func (m *RulesRequest) Reset() { *m = RulesRequest{} } 115 func (m *RulesRequest) String() string { return proto.CompactTextString(m) } 116 func (*RulesRequest) ProtoMessage() {} 117 func (*RulesRequest) Descriptor() ([]byte, []int) { 118 return fileDescriptor_91b1d28f30eb5efb, []int{0} 119 } 120 func (m *RulesRequest) XXX_Unmarshal(b []byte) error { 121 return m.Unmarshal(b) 122 } 123 func (m *RulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 124 if deterministic { 125 return xxx_messageInfo_RulesRequest.Marshal(b, m, deterministic) 126 } else { 127 b = b[:cap(b)] 128 n, err := m.MarshalToSizedBuffer(b) 129 if err != nil { 130 return nil, err 131 } 132 return b[:n], nil 133 } 134 } 135 func (m *RulesRequest) XXX_Merge(src proto.Message) { 136 xxx_messageInfo_RulesRequest.Merge(m, src) 137 } 138 func (m *RulesRequest) XXX_Size() int { 139 return m.Size() 140 } 141 func (m *RulesRequest) XXX_DiscardUnknown() { 142 xxx_messageInfo_RulesRequest.DiscardUnknown(m) 143 } 144 145 var xxx_messageInfo_RulesRequest proto.InternalMessageInfo 146 147 type RulesResponse struct { 148 // Types that are valid to be assigned to Result: 149 // *RulesResponse_Group 150 // *RulesResponse_Warning 151 Result isRulesResponse_Result `protobuf_oneof:"result"` 152 } 153 154 func (m *RulesResponse) Reset() { *m = RulesResponse{} } 155 func (m *RulesResponse) String() string { return proto.CompactTextString(m) } 156 func (*RulesResponse) ProtoMessage() {} 157 func (*RulesResponse) Descriptor() ([]byte, []int) { 158 return fileDescriptor_91b1d28f30eb5efb, []int{1} 159 } 160 func (m *RulesResponse) XXX_Unmarshal(b []byte) error { 161 return m.Unmarshal(b) 162 } 163 func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 164 if deterministic { 165 return xxx_messageInfo_RulesResponse.Marshal(b, m, deterministic) 166 } else { 167 b = b[:cap(b)] 168 n, err := m.MarshalToSizedBuffer(b) 169 if err != nil { 170 return nil, err 171 } 172 return b[:n], nil 173 } 174 } 175 func (m *RulesResponse) XXX_Merge(src proto.Message) { 176 xxx_messageInfo_RulesResponse.Merge(m, src) 177 } 178 func (m *RulesResponse) XXX_Size() int { 179 return m.Size() 180 } 181 func (m *RulesResponse) XXX_DiscardUnknown() { 182 xxx_messageInfo_RulesResponse.DiscardUnknown(m) 183 } 184 185 var xxx_messageInfo_RulesResponse proto.InternalMessageInfo 186 187 type isRulesResponse_Result interface { 188 isRulesResponse_Result() 189 MarshalTo([]byte) (int, error) 190 Size() int 191 } 192 193 type RulesResponse_Group struct { 194 Group *RuleGroup `protobuf:"bytes,1,opt,name=group,proto3,oneof" json:"group,omitempty"` 195 } 196 type RulesResponse_Warning struct { 197 Warning string `protobuf:"bytes,2,opt,name=warning,proto3,oneof" json:"warning,omitempty"` 198 } 199 200 func (*RulesResponse_Group) isRulesResponse_Result() {} 201 func (*RulesResponse_Warning) isRulesResponse_Result() {} 202 203 func (m *RulesResponse) GetResult() isRulesResponse_Result { 204 if m != nil { 205 return m.Result 206 } 207 return nil 208 } 209 210 func (m *RulesResponse) GetGroup() *RuleGroup { 211 if x, ok := m.GetResult().(*RulesResponse_Group); ok { 212 return x.Group 213 } 214 return nil 215 } 216 217 func (m *RulesResponse) GetWarning() string { 218 if x, ok := m.GetResult().(*RulesResponse_Warning); ok { 219 return x.Warning 220 } 221 return "" 222 } 223 224 // XXX_OneofWrappers is for the internal use of the proto package. 225 func (*RulesResponse) XXX_OneofWrappers() []interface{} { 226 return []interface{}{ 227 (*RulesResponse_Group)(nil), 228 (*RulesResponse_Warning)(nil), 229 } 230 } 231 232 // / RuleGroups is set of rule groups. 233 // / This and below APIs are meant to be used for unmarshaling and marshsaling rules from/to Prometheus API. 234 // / That's why json tag has to be customized and matching https://github.com/prometheus/prometheus/blob/c530b4b456cc5f9ec249f771dff187eb7715dc9b/web/api/v1/api.go#L955 235 // / NOTE: See rules_custom_test.go for compatibility tests. 236 // / 237 // / For rule parsing from YAML configuration other struct is used: https://github.com/prometheus/prometheus/blob/20b1f596f6fb16107ef0c244d240b0ad6da36829/pkg/rulefmt/rulefmt.go#L105 238 type RuleGroups struct { 239 Groups []*RuleGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups"` 240 } 241 242 func (m *RuleGroups) Reset() { *m = RuleGroups{} } 243 func (m *RuleGroups) String() string { return proto.CompactTextString(m) } 244 func (*RuleGroups) ProtoMessage() {} 245 func (*RuleGroups) Descriptor() ([]byte, []int) { 246 return fileDescriptor_91b1d28f30eb5efb, []int{2} 247 } 248 func (m *RuleGroups) XXX_Unmarshal(b []byte) error { 249 return m.Unmarshal(b) 250 } 251 func (m *RuleGroups) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 252 if deterministic { 253 return xxx_messageInfo_RuleGroups.Marshal(b, m, deterministic) 254 } else { 255 b = b[:cap(b)] 256 n, err := m.MarshalToSizedBuffer(b) 257 if err != nil { 258 return nil, err 259 } 260 return b[:n], nil 261 } 262 } 263 func (m *RuleGroups) XXX_Merge(src proto.Message) { 264 xxx_messageInfo_RuleGroups.Merge(m, src) 265 } 266 func (m *RuleGroups) XXX_Size() int { 267 return m.Size() 268 } 269 func (m *RuleGroups) XXX_DiscardUnknown() { 270 xxx_messageInfo_RuleGroups.DiscardUnknown(m) 271 } 272 273 var xxx_messageInfo_RuleGroups proto.InternalMessageInfo 274 275 // / RuleGroup has info for rules which are part of a group. 276 type RuleGroup struct { 277 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` 278 File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file"` 279 Rules []*Rule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules"` 280 Interval float64 `protobuf:"fixed64,4,opt,name=interval,proto3" json:"interval"` 281 EvaluationDurationSeconds float64 `protobuf:"fixed64,5,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` 282 LastEvaluation time.Time `protobuf:"bytes,6,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` 283 Limit int64 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit"` 284 // Thanos specific. 285 PartialResponseStrategy storepb.PartialResponseStrategy `protobuf:"varint,8,opt,name=PartialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partialResponseStrategy"` 286 } 287 288 func (m *RuleGroup) Reset() { *m = RuleGroup{} } 289 func (m *RuleGroup) String() string { return proto.CompactTextString(m) } 290 func (*RuleGroup) ProtoMessage() {} 291 func (*RuleGroup) Descriptor() ([]byte, []int) { 292 return fileDescriptor_91b1d28f30eb5efb, []int{3} 293 } 294 func (m *RuleGroup) XXX_Unmarshal(b []byte) error { 295 return m.Unmarshal(b) 296 } 297 func (m *RuleGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 298 if deterministic { 299 return xxx_messageInfo_RuleGroup.Marshal(b, m, deterministic) 300 } else { 301 b = b[:cap(b)] 302 n, err := m.MarshalToSizedBuffer(b) 303 if err != nil { 304 return nil, err 305 } 306 return b[:n], nil 307 } 308 } 309 func (m *RuleGroup) XXX_Merge(src proto.Message) { 310 xxx_messageInfo_RuleGroup.Merge(m, src) 311 } 312 func (m *RuleGroup) XXX_Size() int { 313 return m.Size() 314 } 315 func (m *RuleGroup) XXX_DiscardUnknown() { 316 xxx_messageInfo_RuleGroup.DiscardUnknown(m) 317 } 318 319 var xxx_messageInfo_RuleGroup proto.InternalMessageInfo 320 321 type Rule struct { 322 // Types that are valid to be assigned to Result: 323 // *Rule_Recording 324 // *Rule_Alert 325 Result isRule_Result `protobuf_oneof:"result"` 326 } 327 328 func (m *Rule) Reset() { *m = Rule{} } 329 func (m *Rule) String() string { return proto.CompactTextString(m) } 330 func (*Rule) ProtoMessage() {} 331 func (*Rule) Descriptor() ([]byte, []int) { 332 return fileDescriptor_91b1d28f30eb5efb, []int{4} 333 } 334 func (m *Rule) XXX_Unmarshal(b []byte) error { 335 return m.Unmarshal(b) 336 } 337 func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 338 if deterministic { 339 return xxx_messageInfo_Rule.Marshal(b, m, deterministic) 340 } else { 341 b = b[:cap(b)] 342 n, err := m.MarshalToSizedBuffer(b) 343 if err != nil { 344 return nil, err 345 } 346 return b[:n], nil 347 } 348 } 349 func (m *Rule) XXX_Merge(src proto.Message) { 350 xxx_messageInfo_Rule.Merge(m, src) 351 } 352 func (m *Rule) XXX_Size() int { 353 return m.Size() 354 } 355 func (m *Rule) XXX_DiscardUnknown() { 356 xxx_messageInfo_Rule.DiscardUnknown(m) 357 } 358 359 var xxx_messageInfo_Rule proto.InternalMessageInfo 360 361 type isRule_Result interface { 362 isRule_Result() 363 MarshalTo([]byte) (int, error) 364 Size() int 365 } 366 367 type Rule_Recording struct { 368 Recording *RecordingRule `protobuf:"bytes,1,opt,name=recording,proto3,oneof" json:"recording,omitempty"` 369 } 370 type Rule_Alert struct { 371 Alert *Alert `protobuf:"bytes,2,opt,name=alert,proto3,oneof" json:"alert,omitempty"` 372 } 373 374 func (*Rule_Recording) isRule_Result() {} 375 func (*Rule_Alert) isRule_Result() {} 376 377 func (m *Rule) GetResult() isRule_Result { 378 if m != nil { 379 return m.Result 380 } 381 return nil 382 } 383 384 func (m *Rule) GetRecording() *RecordingRule { 385 if x, ok := m.GetResult().(*Rule_Recording); ok { 386 return x.Recording 387 } 388 return nil 389 } 390 391 func (m *Rule) GetAlert() *Alert { 392 if x, ok := m.GetResult().(*Rule_Alert); ok { 393 return x.Alert 394 } 395 return nil 396 } 397 398 // XXX_OneofWrappers is for the internal use of the proto package. 399 func (*Rule) XXX_OneofWrappers() []interface{} { 400 return []interface{}{ 401 (*Rule_Recording)(nil), 402 (*Rule_Alert)(nil), 403 } 404 } 405 406 type AlertInstance struct { 407 Labels labelpb.ZLabelSet `protobuf:"bytes,1,opt,name=labels,proto3" json:"labels"` 408 Annotations labelpb.ZLabelSet `protobuf:"bytes,2,opt,name=annotations,proto3" json:"annotations"` 409 State AlertState `protobuf:"varint,3,opt,name=state,proto3,enum=thanos.AlertState" json:"state"` 410 ActiveAt *time.Time `protobuf:"bytes,4,opt,name=active_at,json=activeAt,proto3,stdtime" json:"activeAt,omitempty"` 411 Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value"` 412 // Thanos specific. Used mainly for alert API purposes. 413 PartialResponseStrategy storepb.PartialResponseStrategy `protobuf:"varint,6,opt,name=PartialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partialResponseStrategy"` 414 } 415 416 func (m *AlertInstance) Reset() { *m = AlertInstance{} } 417 func (m *AlertInstance) String() string { return proto.CompactTextString(m) } 418 func (*AlertInstance) ProtoMessage() {} 419 func (*AlertInstance) Descriptor() ([]byte, []int) { 420 return fileDescriptor_91b1d28f30eb5efb, []int{5} 421 } 422 func (m *AlertInstance) XXX_Unmarshal(b []byte) error { 423 return m.Unmarshal(b) 424 } 425 func (m *AlertInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 426 if deterministic { 427 return xxx_messageInfo_AlertInstance.Marshal(b, m, deterministic) 428 } else { 429 b = b[:cap(b)] 430 n, err := m.MarshalToSizedBuffer(b) 431 if err != nil { 432 return nil, err 433 } 434 return b[:n], nil 435 } 436 } 437 func (m *AlertInstance) XXX_Merge(src proto.Message) { 438 xxx_messageInfo_AlertInstance.Merge(m, src) 439 } 440 func (m *AlertInstance) XXX_Size() int { 441 return m.Size() 442 } 443 func (m *AlertInstance) XXX_DiscardUnknown() { 444 xxx_messageInfo_AlertInstance.DiscardUnknown(m) 445 } 446 447 var xxx_messageInfo_AlertInstance proto.InternalMessageInfo 448 449 type Alert struct { 450 /// state returns the maximum state of alert instances for this rule. 451 State AlertState `protobuf:"varint,1,opt,name=state,proto3,enum=thanos.AlertState" json:"state"` 452 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` 453 Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query"` 454 DurationSeconds float64 `protobuf:"fixed64,4,opt,name=duration_seconds,json=durationSeconds,proto3" json:"duration"` 455 Labels labelpb.ZLabelSet `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels"` 456 Annotations labelpb.ZLabelSet `protobuf:"bytes,6,opt,name=annotations,proto3" json:"annotations"` 457 Alerts []*AlertInstance `protobuf:"bytes,7,rep,name=alerts,proto3" json:"alerts"` 458 Health string `protobuf:"bytes,8,opt,name=health,proto3" json:"health"` 459 LastError string `protobuf:"bytes,9,opt,name=last_error,json=lastError,proto3" json:"lastError,omitempty"` 460 EvaluationDurationSeconds float64 `protobuf:"fixed64,10,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` 461 LastEvaluation time.Time `protobuf:"bytes,11,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` 462 } 463 464 func (m *Alert) Reset() { *m = Alert{} } 465 func (m *Alert) String() string { return proto.CompactTextString(m) } 466 func (*Alert) ProtoMessage() {} 467 func (*Alert) Descriptor() ([]byte, []int) { 468 return fileDescriptor_91b1d28f30eb5efb, []int{6} 469 } 470 func (m *Alert) XXX_Unmarshal(b []byte) error { 471 return m.Unmarshal(b) 472 } 473 func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 474 if deterministic { 475 return xxx_messageInfo_Alert.Marshal(b, m, deterministic) 476 } else { 477 b = b[:cap(b)] 478 n, err := m.MarshalToSizedBuffer(b) 479 if err != nil { 480 return nil, err 481 } 482 return b[:n], nil 483 } 484 } 485 func (m *Alert) XXX_Merge(src proto.Message) { 486 xxx_messageInfo_Alert.Merge(m, src) 487 } 488 func (m *Alert) XXX_Size() int { 489 return m.Size() 490 } 491 func (m *Alert) XXX_DiscardUnknown() { 492 xxx_messageInfo_Alert.DiscardUnknown(m) 493 } 494 495 var xxx_messageInfo_Alert proto.InternalMessageInfo 496 497 type RecordingRule struct { 498 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` 499 Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query"` 500 Labels labelpb.ZLabelSet `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels"` 501 Health string `protobuf:"bytes,4,opt,name=health,proto3" json:"health"` 502 LastError string `protobuf:"bytes,5,opt,name=last_error,json=lastError,proto3" json:"lastError,omitempty"` 503 EvaluationDurationSeconds float64 `protobuf:"fixed64,6,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` 504 LastEvaluation time.Time `protobuf:"bytes,7,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` 505 } 506 507 func (m *RecordingRule) Reset() { *m = RecordingRule{} } 508 func (m *RecordingRule) String() string { return proto.CompactTextString(m) } 509 func (*RecordingRule) ProtoMessage() {} 510 func (*RecordingRule) Descriptor() ([]byte, []int) { 511 return fileDescriptor_91b1d28f30eb5efb, []int{7} 512 } 513 func (m *RecordingRule) XXX_Unmarshal(b []byte) error { 514 return m.Unmarshal(b) 515 } 516 func (m *RecordingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 517 if deterministic { 518 return xxx_messageInfo_RecordingRule.Marshal(b, m, deterministic) 519 } else { 520 b = b[:cap(b)] 521 n, err := m.MarshalToSizedBuffer(b) 522 if err != nil { 523 return nil, err 524 } 525 return b[:n], nil 526 } 527 } 528 func (m *RecordingRule) XXX_Merge(src proto.Message) { 529 xxx_messageInfo_RecordingRule.Merge(m, src) 530 } 531 func (m *RecordingRule) XXX_Size() int { 532 return m.Size() 533 } 534 func (m *RecordingRule) XXX_DiscardUnknown() { 535 xxx_messageInfo_RecordingRule.DiscardUnknown(m) 536 } 537 538 var xxx_messageInfo_RecordingRule proto.InternalMessageInfo 539 540 func init() { 541 proto.RegisterEnum("thanos.AlertState", AlertState_name, AlertState_value) 542 proto.RegisterEnum("thanos.RulesRequest_Type", RulesRequest_Type_name, RulesRequest_Type_value) 543 proto.RegisterType((*RulesRequest)(nil), "thanos.RulesRequest") 544 proto.RegisterType((*RulesResponse)(nil), "thanos.RulesResponse") 545 proto.RegisterType((*RuleGroups)(nil), "thanos.RuleGroups") 546 proto.RegisterType((*RuleGroup)(nil), "thanos.RuleGroup") 547 proto.RegisterType((*Rule)(nil), "thanos.Rule") 548 proto.RegisterType((*AlertInstance)(nil), "thanos.AlertInstance") 549 proto.RegisterType((*Alert)(nil), "thanos.Alert") 550 proto.RegisterType((*RecordingRule)(nil), "thanos.RecordingRule") 551 } 552 553 func init() { proto.RegisterFile("rules/rulespb/rpc.proto", fileDescriptor_91b1d28f30eb5efb) } 554 555 var fileDescriptor_91b1d28f30eb5efb = []byte{ 556 // 1022 bytes of a gzipped FileDescriptorProto 557 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x4f, 0xe3, 0x46, 558 0x14, 0xb6, 0x71, 0xec, 0xc4, 0x2f, 0xc0, 0xd2, 0xd9, 0x45, 0x18, 0xb6, 0x8a, 0x51, 0x24, 0x2a, 559 0x5a, 0x75, 0x93, 0x0a, 0xb4, 0x5b, 0xed, 0xa9, 0xc2, 0x40, 0x17, 0x24, 0x44, 0x57, 0x13, 0xd4, 560 0xc3, 0xf6, 0x90, 0x0e, 0x61, 0x36, 0x58, 0x72, 0x6c, 0xef, 0xcc, 0x84, 0x8a, 0x1f, 0xd0, 0xfb, 561 0x9e, 0xfb, 0x47, 0xfa, 0x17, 0x38, 0xee, 0xb1, 0xa7, 0xb4, 0x85, 0x53, 0x73, 0xe8, 0x6f, 0xa8, 562 0x66, 0xc6, 0x8e, 0x43, 0x1a, 0xca, 0x6e, 0x9b, 0x5e, 0xfc, 0x66, 0xde, 0xfb, 0xde, 0x78, 0xe6, 563 0xbd, 0x6f, 0x3e, 0x1b, 0x56, 0x58, 0x3f, 0xa2, 0xbc, 0xa9, 0x9e, 0xe9, 0x69, 0x93, 0xa5, 0x9d, 564 0x46, 0xca, 0x12, 0x91, 0x20, 0x47, 0x9c, 0x93, 0x38, 0xe1, 0x6b, 0xab, 0x5c, 0x24, 0x8c, 0x36, 565 0xd5, 0x33, 0x3d, 0x6d, 0x8a, 0xcb, 0x94, 0x72, 0x0d, 0xc9, 0x43, 0x11, 0x39, 0xa5, 0xd1, 0x44, 566 0xe8, 0x51, 0x37, 0xe9, 0x26, 0x6a, 0xd8, 0x94, 0xa3, 0xcc, 0xeb, 0x77, 0x93, 0xa4, 0x1b, 0xd1, 567 0xa6, 0x9a, 0x9d, 0xf6, 0x5f, 0x37, 0x45, 0xd8, 0xa3, 0x5c, 0x90, 0x5e, 0xaa, 0x01, 0xf5, 0x3f, 568 0x4c, 0x98, 0xc7, 0x72, 0x2b, 0x98, 0xbe, 0xe9, 0x53, 0x2e, 0xd0, 0x13, 0x28, 0xc9, 0x65, 0x3d, 569 0x73, 0xdd, 0xdc, 0x5c, 0xdc, 0x5a, 0x6d, 0xe8, 0x4d, 0x35, 0xc6, 0x31, 0x8d, 0x93, 0xcb, 0x94, 570 0x62, 0x05, 0x43, 0xdf, 0xc1, 0x6a, 0x4a, 0x98, 0x08, 0x49, 0xd4, 0x66, 0x94, 0xa7, 0x49, 0xcc, 571 0x69, 0x9b, 0x0b, 0x46, 0x04, 0xed, 0x5e, 0x7a, 0x73, 0x6a, 0x0d, 0x3f, 0x5f, 0xe3, 0xa5, 0x06, 572 0xe2, 0x0c, 0xd7, 0xca, 0x60, 0x78, 0x25, 0x9d, 0x1e, 0x40, 0x1b, 0xb0, 0xd8, 0x23, 0xa2, 0x73, 573 0x4e, 0x99, 0x5c, 0x33, 0x8c, 0xbb, 0x9e, 0xb5, 0x6e, 0x6d, 0xba, 0x78, 0x21, 0xf3, 0xb6, 0x94, 574 0xb3, 0xfe, 0x09, 0x94, 0xe4, 0x8e, 0x50, 0x19, 0xac, 0x9d, 0xa3, 0xa3, 0x25, 0x03, 0xb9, 0x60, 575 0xef, 0x1c, 0xed, 0xe3, 0x93, 0x25, 0x13, 0x01, 0x38, 0x78, 0x7f, 0xf7, 0x1b, 0xbc, 0xb7, 0x34, 576 0x57, 0xff, 0x1e, 0x16, 0xb2, 0x63, 0xe8, 0xf7, 0xa0, 0x4f, 0xc1, 0xee, 0xb2, 0xa4, 0x9f, 0xaa, 577 0xc3, 0x56, 0xb7, 0x3e, 0x1a, 0x3f, 0xec, 0x0b, 0x19, 0x38, 0x30, 0xb0, 0x46, 0xa0, 0x35, 0x28, 578 0xff, 0x40, 0x58, 0x2c, 0xf7, 0x20, 0x4f, 0xe5, 0x1e, 0x18, 0x38, 0x77, 0x04, 0x15, 0x70, 0x18, 579 0xe5, 0xfd, 0x48, 0xd4, 0x77, 0x01, 0x46, 0xb9, 0x1c, 0x3d, 0x05, 0x47, 0x25, 0x73, 0xcf, 0x5c, 580 0xb7, 0xa6, 0xae, 0x1f, 0xc0, 0x70, 0xe0, 0x67, 0x20, 0x9c, 0xd9, 0xfa, 0x9f, 0x16, 0xb8, 0x23, 581 0x04, 0xfa, 0x18, 0x4a, 0x31, 0xe9, 0xe9, 0x7e, 0xb8, 0x41, 0x65, 0x38, 0xf0, 0xd5, 0x1c, 0xab, 582 0xa7, 0x8c, 0xbe, 0x0e, 0x23, 0xaa, 0xf7, 0xa4, 0xa3, 0x72, 0x8e, 0xd5, 0x13, 0x3d, 0x01, 0x5b, 583 0xd1, 0x4c, 0x95, 0xad, 0xba, 0x35, 0x3f, 0xfe, 0xfe, 0xc0, 0x1d, 0x0e, 0x7c, 0x1d, 0xc6, 0xda, 584 0xa0, 0x4d, 0xa8, 0x84, 0xb1, 0xa0, 0xec, 0x82, 0x44, 0x5e, 0x69, 0xdd, 0xdc, 0x34, 0x83, 0xf9, 585 0xe1, 0xc0, 0x1f, 0xf9, 0xf0, 0x68, 0x84, 0x30, 0x3c, 0xa6, 0x17, 0x24, 0xea, 0x13, 0x11, 0x26, 586 0x71, 0xfb, 0xac, 0xcf, 0xf4, 0x80, 0xd3, 0x4e, 0x12, 0x9f, 0x71, 0xcf, 0x56, 0xc9, 0x68, 0x38, 587 0xf0, 0x17, 0x0b, 0xd8, 0x49, 0xd8, 0xa3, 0x78, 0xb5, 0x98, 0xef, 0x65, 0x59, 0x2d, 0x9d, 0x84, 588 0xda, 0xf0, 0x20, 0x22, 0x5c, 0xb4, 0x0b, 0x84, 0xe7, 0xa8, 0xb6, 0xac, 0x35, 0x34, 0x89, 0x1b, 589 0x39, 0x89, 0x1b, 0x27, 0x39, 0x89, 0x83, 0xb5, 0xab, 0x81, 0x6f, 0xc8, 0xf7, 0xc8, 0xd4, 0xfd, 590 0x51, 0xe6, 0xdb, 0x5f, 0x7d, 0x13, 0x4f, 0xf8, 0x90, 0x0f, 0x76, 0x14, 0xf6, 0x42, 0xe1, 0xb9, 591 0xeb, 0xe6, 0xa6, 0xa5, 0xcf, 0xaf, 0x1c, 0x58, 0x1b, 0x74, 0x01, 0x2b, 0x77, 0x50, 0xd4, 0xab, 592 0xbc, 0x17, 0x93, 0x83, 0xc7, 0xc3, 0x81, 0x7f, 0x17, 0x9b, 0xf1, 0x5d, 0x8b, 0xd7, 0x63, 0x28, 593 0xc9, 0x8e, 0xa0, 0xa7, 0xe0, 0x32, 0xda, 0x49, 0xd8, 0x99, 0x64, 0x99, 0xa6, 0xe4, 0xf2, 0xa8, 594 0x65, 0x79, 0x40, 0x22, 0x0f, 0x0c, 0x5c, 0x20, 0xd1, 0x06, 0xd8, 0x24, 0xa2, 0x4c, 0x28, 0x12, 595 0x54, 0xb7, 0x16, 0xf2, 0x94, 0x1d, 0xe9, 0x94, 0x0c, 0x56, 0xd1, 0x31, 0x96, 0xfe, 0x6c, 0xc1, 596 0x82, 0x0a, 0x1e, 0xc6, 0x5c, 0x90, 0xb8, 0x43, 0xd1, 0x73, 0x70, 0x94, 0xa6, 0xf0, 0xc9, 0x9b, 597 0xf0, 0xea, 0x48, 0xba, 0x5b, 0x54, 0x04, 0x8b, 0x59, 0xa5, 0x33, 0x20, 0xce, 0x2c, 0x3a, 0x80, 598 0x2a, 0x89, 0xe3, 0x44, 0xa8, 0x1a, 0xf3, 0x6c, 0x0f, 0x53, 0xf2, 0x1f, 0x66, 0xf9, 0xe3, 0x68, 599 0x3c, 0x3e, 0x41, 0xdb, 0x60, 0x73, 0x41, 0x04, 0xf5, 0x2c, 0x55, 0x6c, 0x74, 0xeb, 0x1c, 0x2d, 600 0x19, 0xd1, 0x3d, 0x53, 0x20, 0xac, 0x0d, 0x6a, 0x81, 0x4b, 0x3a, 0x22, 0xbc, 0xa0, 0x6d, 0x22, 601 0x14, 0x69, 0xef, 0xe1, 0xcb, 0x70, 0xe0, 0x23, 0x9d, 0xb0, 0x23, 0x3e, 0x4f, 0x7a, 0xa1, 0xa0, 602 0xbd, 0x54, 0x5c, 0x2a, 0xbe, 0x54, 0x72, 0xbf, 0x64, 0x8a, 0xa4, 0x0d, 0x55, 0x44, 0x76, 0xf5, 603 0x5b, 0x95, 0x03, 0x6b, 0xf3, 0x4f, 0x4c, 0x71, 0xfe, 0x4f, 0xa6, 0xfc, 0x68, 0x83, 0xad, 0xca, 604 0x51, 0x14, 0xcb, 0xfc, 0x80, 0x62, 0xe5, 0x5a, 0x32, 0x37, 0x55, 0x4b, 0x7c, 0xb0, 0xdf, 0xf4, 605 0x29, 0xbb, 0x54, 0xf5, 0xcf, 0x4e, 0xad, 0x1c, 0x58, 0x1b, 0xf4, 0x25, 0x2c, 0xfd, 0xed, 0xaa, 606 0x8f, 0xe9, 0x44, 0x1e, 0xc3, 0x0f, 0xce, 0x26, 0xae, 0x76, 0x41, 0x2f, 0xfb, 0x3f, 0xd2, 0xcb, 607 0xf9, 0xf7, 0xf4, 0x7a, 0x0e, 0x8e, 0xba, 0x08, 0xdc, 0x2b, 0x2b, 0x35, 0x5c, 0xbe, 0x55, 0xb2, 608 0xfc, 0x2a, 0x68, 0x45, 0xd6, 0x40, 0x9c, 0x59, 0x54, 0x07, 0xe7, 0x9c, 0x92, 0x48, 0x9c, 0x2b, 609 0x1d, 0x70, 0x35, 0x46, 0x7b, 0x70, 0x66, 0xd1, 0x33, 0x00, 0x2d, 0x5f, 0x8c, 0x25, 0x4c, 0x49, 610 0x8c, 0x1b, 0xac, 0x0c, 0x07, 0xfe, 0x43, 0xa5, 0x42, 0xd2, 0x59, 0xd0, 0x0d, 0xbb, 0x23, 0xe7, 611 0x7d, 0x52, 0x0a, 0x33, 0x92, 0xd2, 0xea, 0x2c, 0xa5, 0xb4, 0xfe, 0x93, 0x05, 0x0b, 0xb7, 0x14, 612 0xe9, 0x9e, 0xcf, 0xd4, 0x88, 0x5a, 0x73, 0x77, 0x50, 0xab, 0x60, 0x88, 0xf5, 0xa1, 0x0c, 0x29, 613 0x9a, 0x53, 0x7a, 0xcf, 0xe6, 0xd8, 0xb3, 0x6a, 0x8e, 0x33, 0xa3, 0xe6, 0x94, 0x67, 0xd9, 0x9c, 614 0xcf, 0xb6, 0x01, 0x0a, 0x15, 0x40, 0xf3, 0x50, 0x39, 0x3c, 0xde, 0xd9, 0x3d, 0x39, 0xfc, 0x76, 615 0x7f, 0xc9, 0x40, 0x55, 0x28, 0xbf, 0xdc, 0x3f, 0xde, 0x3b, 0x3c, 0x7e, 0xa1, 0xff, 0x8d, 0xbe, 616 0x3e, 0xc4, 0x72, 0x3c, 0xb7, 0xf5, 0x15, 0xd8, 0xea, 0xdf, 0x08, 0x3d, 0xcb, 0x07, 0x8f, 0xa6, 617 0xfd, 0xfa, 0xad, 0x2d, 0x4f, 0x78, 0xb5, 0x40, 0x7d, 0x61, 0x06, 0x1b, 0x57, 0xbf, 0xd7, 0x8c, 618 0xab, 0xeb, 0x9a, 0xf9, 0xee, 0xba, 0x66, 0xfe, 0x76, 0x5d, 0x33, 0xdf, 0xde, 0xd4, 0x8c, 0x77, 619 0x37, 0x35, 0xe3, 0x97, 0x9b, 0x9a, 0xf1, 0xaa, 0x9c, 0xfd, 0xee, 0x9e, 0x3a, 0xea, 0x70, 0xdb, 620 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x4a, 0xb5, 0xe4, 0x06, 0x0b, 0x00, 0x00, 621 } 622 623 // Reference imports to suppress errors if they are not otherwise used. 624 var _ context.Context 625 var _ grpc.ClientConn 626 627 // This is a compile-time assertion to ensure that this generated file 628 // is compatible with the grpc package it is being compiled against. 629 const _ = grpc.SupportPackageIsVersion4 630 631 // RulesClient is the client API for Rules service. 632 // 633 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 634 type RulesClient interface { 635 /// Rules has info for all rules. 636 /// Returned rules are expected to include external labels. 637 Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (Rules_RulesClient, error) 638 } 639 640 type rulesClient struct { 641 cc *grpc.ClientConn 642 } 643 644 func NewRulesClient(cc *grpc.ClientConn) RulesClient { 645 return &rulesClient{cc} 646 } 647 648 func (c *rulesClient) Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (Rules_RulesClient, error) { 649 stream, err := c.cc.NewStream(ctx, &_Rules_serviceDesc.Streams[0], "/thanos.Rules/Rules", opts...) 650 if err != nil { 651 return nil, err 652 } 653 x := &rulesRulesClient{stream} 654 if err := x.ClientStream.SendMsg(in); err != nil { 655 return nil, err 656 } 657 if err := x.ClientStream.CloseSend(); err != nil { 658 return nil, err 659 } 660 return x, nil 661 } 662 663 type Rules_RulesClient interface { 664 Recv() (*RulesResponse, error) 665 grpc.ClientStream 666 } 667 668 type rulesRulesClient struct { 669 grpc.ClientStream 670 } 671 672 func (x *rulesRulesClient) Recv() (*RulesResponse, error) { 673 m := new(RulesResponse) 674 if err := x.ClientStream.RecvMsg(m); err != nil { 675 return nil, err 676 } 677 return m, nil 678 } 679 680 // RulesServer is the server API for Rules service. 681 type RulesServer interface { 682 /// Rules has info for all rules. 683 /// Returned rules are expected to include external labels. 684 Rules(*RulesRequest, Rules_RulesServer) error 685 } 686 687 // UnimplementedRulesServer can be embedded to have forward compatible implementations. 688 type UnimplementedRulesServer struct { 689 } 690 691 func (*UnimplementedRulesServer) Rules(req *RulesRequest, srv Rules_RulesServer) error { 692 return status.Errorf(codes.Unimplemented, "method Rules not implemented") 693 } 694 695 func RegisterRulesServer(s *grpc.Server, srv RulesServer) { 696 s.RegisterService(&_Rules_serviceDesc, srv) 697 } 698 699 func _Rules_Rules_Handler(srv interface{}, stream grpc.ServerStream) error { 700 m := new(RulesRequest) 701 if err := stream.RecvMsg(m); err != nil { 702 return err 703 } 704 return srv.(RulesServer).Rules(m, &rulesRulesServer{stream}) 705 } 706 707 type Rules_RulesServer interface { 708 Send(*RulesResponse) error 709 grpc.ServerStream 710 } 711 712 type rulesRulesServer struct { 713 grpc.ServerStream 714 } 715 716 func (x *rulesRulesServer) Send(m *RulesResponse) error { 717 return x.ServerStream.SendMsg(m) 718 } 719 720 var _Rules_serviceDesc = grpc.ServiceDesc{ 721 ServiceName: "thanos.Rules", 722 HandlerType: (*RulesServer)(nil), 723 Methods: []grpc.MethodDesc{}, 724 Streams: []grpc.StreamDesc{ 725 { 726 StreamName: "Rules", 727 Handler: _Rules_Rules_Handler, 728 ServerStreams: true, 729 }, 730 }, 731 Metadata: "rules/rulespb/rpc.proto", 732 } 733 734 func (m *RulesRequest) Marshal() (dAtA []byte, err error) { 735 size := m.Size() 736 dAtA = make([]byte, size) 737 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 738 if err != nil { 739 return nil, err 740 } 741 return dAtA[:n], nil 742 } 743 744 func (m *RulesRequest) MarshalTo(dAtA []byte) (int, error) { 745 size := m.Size() 746 return m.MarshalToSizedBuffer(dAtA[:size]) 747 } 748 749 func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 750 i := len(dAtA) 751 _ = i 752 var l int 753 _ = l 754 if len(m.MatcherString) > 0 { 755 for iNdEx := len(m.MatcherString) - 1; iNdEx >= 0; iNdEx-- { 756 i -= len(m.MatcherString[iNdEx]) 757 copy(dAtA[i:], m.MatcherString[iNdEx]) 758 i = encodeVarintRpc(dAtA, i, uint64(len(m.MatcherString[iNdEx]))) 759 i-- 760 dAtA[i] = 0x1a 761 } 762 } 763 if m.PartialResponseStrategy != 0 { 764 i = encodeVarintRpc(dAtA, i, uint64(m.PartialResponseStrategy)) 765 i-- 766 dAtA[i] = 0x10 767 } 768 if m.Type != 0 { 769 i = encodeVarintRpc(dAtA, i, uint64(m.Type)) 770 i-- 771 dAtA[i] = 0x8 772 } 773 return len(dAtA) - i, nil 774 } 775 776 func (m *RulesResponse) Marshal() (dAtA []byte, err error) { 777 size := m.Size() 778 dAtA = make([]byte, size) 779 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 780 if err != nil { 781 return nil, err 782 } 783 return dAtA[:n], nil 784 } 785 786 func (m *RulesResponse) MarshalTo(dAtA []byte) (int, error) { 787 size := m.Size() 788 return m.MarshalToSizedBuffer(dAtA[:size]) 789 } 790 791 func (m *RulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 792 i := len(dAtA) 793 _ = i 794 var l int 795 _ = l 796 if m.Result != nil { 797 { 798 size := m.Result.Size() 799 i -= size 800 if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil { 801 return 0, err 802 } 803 } 804 } 805 return len(dAtA) - i, nil 806 } 807 808 func (m *RulesResponse_Group) MarshalTo(dAtA []byte) (int, error) { 809 size := m.Size() 810 return m.MarshalToSizedBuffer(dAtA[:size]) 811 } 812 813 func (m *RulesResponse_Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { 814 i := len(dAtA) 815 if m.Group != nil { 816 { 817 size, err := m.Group.MarshalToSizedBuffer(dAtA[:i]) 818 if err != nil { 819 return 0, err 820 } 821 i -= size 822 i = encodeVarintRpc(dAtA, i, uint64(size)) 823 } 824 i-- 825 dAtA[i] = 0xa 826 } 827 return len(dAtA) - i, nil 828 } 829 func (m *RulesResponse_Warning) MarshalTo(dAtA []byte) (int, error) { 830 size := m.Size() 831 return m.MarshalToSizedBuffer(dAtA[:size]) 832 } 833 834 func (m *RulesResponse_Warning) MarshalToSizedBuffer(dAtA []byte) (int, error) { 835 i := len(dAtA) 836 i -= len(m.Warning) 837 copy(dAtA[i:], m.Warning) 838 i = encodeVarintRpc(dAtA, i, uint64(len(m.Warning))) 839 i-- 840 dAtA[i] = 0x12 841 return len(dAtA) - i, nil 842 } 843 func (m *RuleGroups) Marshal() (dAtA []byte, err error) { 844 size := m.Size() 845 dAtA = make([]byte, size) 846 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 847 if err != nil { 848 return nil, err 849 } 850 return dAtA[:n], nil 851 } 852 853 func (m *RuleGroups) MarshalTo(dAtA []byte) (int, error) { 854 size := m.Size() 855 return m.MarshalToSizedBuffer(dAtA[:size]) 856 } 857 858 func (m *RuleGroups) MarshalToSizedBuffer(dAtA []byte) (int, error) { 859 i := len(dAtA) 860 _ = i 861 var l int 862 _ = l 863 if len(m.Groups) > 0 { 864 for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { 865 { 866 size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 867 if err != nil { 868 return 0, err 869 } 870 i -= size 871 i = encodeVarintRpc(dAtA, i, uint64(size)) 872 } 873 i-- 874 dAtA[i] = 0xa 875 } 876 } 877 return len(dAtA) - i, nil 878 } 879 880 func (m *RuleGroup) Marshal() (dAtA []byte, err error) { 881 size := m.Size() 882 dAtA = make([]byte, size) 883 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 884 if err != nil { 885 return nil, err 886 } 887 return dAtA[:n], nil 888 } 889 890 func (m *RuleGroup) MarshalTo(dAtA []byte) (int, error) { 891 size := m.Size() 892 return m.MarshalToSizedBuffer(dAtA[:size]) 893 } 894 895 func (m *RuleGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { 896 i := len(dAtA) 897 _ = i 898 var l int 899 _ = l 900 if m.Limit != 0 { 901 i = encodeVarintRpc(dAtA, i, uint64(m.Limit)) 902 i-- 903 dAtA[i] = 0x48 904 } 905 if m.PartialResponseStrategy != 0 { 906 i = encodeVarintRpc(dAtA, i, uint64(m.PartialResponseStrategy)) 907 i-- 908 dAtA[i] = 0x40 909 } 910 n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastEvaluation, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation):]) 911 if err2 != nil { 912 return 0, err2 913 } 914 i -= n2 915 i = encodeVarintRpc(dAtA, i, uint64(n2)) 916 i-- 917 dAtA[i] = 0x32 918 if m.EvaluationDurationSeconds != 0 { 919 i -= 8 920 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.EvaluationDurationSeconds)))) 921 i-- 922 dAtA[i] = 0x29 923 } 924 if m.Interval != 0 { 925 i -= 8 926 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Interval)))) 927 i-- 928 dAtA[i] = 0x21 929 } 930 if len(m.Rules) > 0 { 931 for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { 932 { 933 size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 934 if err != nil { 935 return 0, err 936 } 937 i -= size 938 i = encodeVarintRpc(dAtA, i, uint64(size)) 939 } 940 i-- 941 dAtA[i] = 0x1a 942 } 943 } 944 if len(m.File) > 0 { 945 i -= len(m.File) 946 copy(dAtA[i:], m.File) 947 i = encodeVarintRpc(dAtA, i, uint64(len(m.File))) 948 i-- 949 dAtA[i] = 0x12 950 } 951 if len(m.Name) > 0 { 952 i -= len(m.Name) 953 copy(dAtA[i:], m.Name) 954 i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) 955 i-- 956 dAtA[i] = 0xa 957 } 958 return len(dAtA) - i, nil 959 } 960 961 func (m *Rule) Marshal() (dAtA []byte, err error) { 962 size := m.Size() 963 dAtA = make([]byte, size) 964 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 965 if err != nil { 966 return nil, err 967 } 968 return dAtA[:n], nil 969 } 970 971 func (m *Rule) MarshalTo(dAtA []byte) (int, error) { 972 size := m.Size() 973 return m.MarshalToSizedBuffer(dAtA[:size]) 974 } 975 976 func (m *Rule) MarshalToSizedBuffer(dAtA []byte) (int, error) { 977 i := len(dAtA) 978 _ = i 979 var l int 980 _ = l 981 if m.Result != nil { 982 { 983 size := m.Result.Size() 984 i -= size 985 if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil { 986 return 0, err 987 } 988 } 989 } 990 return len(dAtA) - i, nil 991 } 992 993 func (m *Rule_Recording) MarshalTo(dAtA []byte) (int, error) { 994 size := m.Size() 995 return m.MarshalToSizedBuffer(dAtA[:size]) 996 } 997 998 func (m *Rule_Recording) MarshalToSizedBuffer(dAtA []byte) (int, error) { 999 i := len(dAtA) 1000 if m.Recording != nil { 1001 { 1002 size, err := m.Recording.MarshalToSizedBuffer(dAtA[:i]) 1003 if err != nil { 1004 return 0, err 1005 } 1006 i -= size 1007 i = encodeVarintRpc(dAtA, i, uint64(size)) 1008 } 1009 i-- 1010 dAtA[i] = 0xa 1011 } 1012 return len(dAtA) - i, nil 1013 } 1014 func (m *Rule_Alert) MarshalTo(dAtA []byte) (int, error) { 1015 size := m.Size() 1016 return m.MarshalToSizedBuffer(dAtA[:size]) 1017 } 1018 1019 func (m *Rule_Alert) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1020 i := len(dAtA) 1021 if m.Alert != nil { 1022 { 1023 size, err := m.Alert.MarshalToSizedBuffer(dAtA[:i]) 1024 if err != nil { 1025 return 0, err 1026 } 1027 i -= size 1028 i = encodeVarintRpc(dAtA, i, uint64(size)) 1029 } 1030 i-- 1031 dAtA[i] = 0x12 1032 } 1033 return len(dAtA) - i, nil 1034 } 1035 func (m *AlertInstance) Marshal() (dAtA []byte, err error) { 1036 size := m.Size() 1037 dAtA = make([]byte, size) 1038 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1039 if err != nil { 1040 return nil, err 1041 } 1042 return dAtA[:n], nil 1043 } 1044 1045 func (m *AlertInstance) MarshalTo(dAtA []byte) (int, error) { 1046 size := m.Size() 1047 return m.MarshalToSizedBuffer(dAtA[:size]) 1048 } 1049 1050 func (m *AlertInstance) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1051 i := len(dAtA) 1052 _ = i 1053 var l int 1054 _ = l 1055 if m.PartialResponseStrategy != 0 { 1056 i = encodeVarintRpc(dAtA, i, uint64(m.PartialResponseStrategy)) 1057 i-- 1058 dAtA[i] = 0x30 1059 } 1060 if len(m.Value) > 0 { 1061 i -= len(m.Value) 1062 copy(dAtA[i:], m.Value) 1063 i = encodeVarintRpc(dAtA, i, uint64(len(m.Value))) 1064 i-- 1065 dAtA[i] = 0x2a 1066 } 1067 if m.ActiveAt != nil { 1068 n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.ActiveAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.ActiveAt):]) 1069 if err5 != nil { 1070 return 0, err5 1071 } 1072 i -= n5 1073 i = encodeVarintRpc(dAtA, i, uint64(n5)) 1074 i-- 1075 dAtA[i] = 0x22 1076 } 1077 if m.State != 0 { 1078 i = encodeVarintRpc(dAtA, i, uint64(m.State)) 1079 i-- 1080 dAtA[i] = 0x18 1081 } 1082 { 1083 size, err := m.Annotations.MarshalToSizedBuffer(dAtA[:i]) 1084 if err != nil { 1085 return 0, err 1086 } 1087 i -= size 1088 i = encodeVarintRpc(dAtA, i, uint64(size)) 1089 } 1090 i-- 1091 dAtA[i] = 0x12 1092 { 1093 size, err := m.Labels.MarshalToSizedBuffer(dAtA[:i]) 1094 if err != nil { 1095 return 0, err 1096 } 1097 i -= size 1098 i = encodeVarintRpc(dAtA, i, uint64(size)) 1099 } 1100 i-- 1101 dAtA[i] = 0xa 1102 return len(dAtA) - i, nil 1103 } 1104 1105 func (m *Alert) Marshal() (dAtA []byte, err error) { 1106 size := m.Size() 1107 dAtA = make([]byte, size) 1108 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1109 if err != nil { 1110 return nil, err 1111 } 1112 return dAtA[:n], nil 1113 } 1114 1115 func (m *Alert) MarshalTo(dAtA []byte) (int, error) { 1116 size := m.Size() 1117 return m.MarshalToSizedBuffer(dAtA[:size]) 1118 } 1119 1120 func (m *Alert) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1121 i := len(dAtA) 1122 _ = i 1123 var l int 1124 _ = l 1125 n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastEvaluation, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation):]) 1126 if err8 != nil { 1127 return 0, err8 1128 } 1129 i -= n8 1130 i = encodeVarintRpc(dAtA, i, uint64(n8)) 1131 i-- 1132 dAtA[i] = 0x5a 1133 if m.EvaluationDurationSeconds != 0 { 1134 i -= 8 1135 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.EvaluationDurationSeconds)))) 1136 i-- 1137 dAtA[i] = 0x51 1138 } 1139 if len(m.LastError) > 0 { 1140 i -= len(m.LastError) 1141 copy(dAtA[i:], m.LastError) 1142 i = encodeVarintRpc(dAtA, i, uint64(len(m.LastError))) 1143 i-- 1144 dAtA[i] = 0x4a 1145 } 1146 if len(m.Health) > 0 { 1147 i -= len(m.Health) 1148 copy(dAtA[i:], m.Health) 1149 i = encodeVarintRpc(dAtA, i, uint64(len(m.Health))) 1150 i-- 1151 dAtA[i] = 0x42 1152 } 1153 if len(m.Alerts) > 0 { 1154 for iNdEx := len(m.Alerts) - 1; iNdEx >= 0; iNdEx-- { 1155 { 1156 size, err := m.Alerts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1157 if err != nil { 1158 return 0, err 1159 } 1160 i -= size 1161 i = encodeVarintRpc(dAtA, i, uint64(size)) 1162 } 1163 i-- 1164 dAtA[i] = 0x3a 1165 } 1166 } 1167 { 1168 size, err := m.Annotations.MarshalToSizedBuffer(dAtA[:i]) 1169 if err != nil { 1170 return 0, err 1171 } 1172 i -= size 1173 i = encodeVarintRpc(dAtA, i, uint64(size)) 1174 } 1175 i-- 1176 dAtA[i] = 0x32 1177 { 1178 size, err := m.Labels.MarshalToSizedBuffer(dAtA[:i]) 1179 if err != nil { 1180 return 0, err 1181 } 1182 i -= size 1183 i = encodeVarintRpc(dAtA, i, uint64(size)) 1184 } 1185 i-- 1186 dAtA[i] = 0x2a 1187 if m.DurationSeconds != 0 { 1188 i -= 8 1189 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DurationSeconds)))) 1190 i-- 1191 dAtA[i] = 0x21 1192 } 1193 if len(m.Query) > 0 { 1194 i -= len(m.Query) 1195 copy(dAtA[i:], m.Query) 1196 i = encodeVarintRpc(dAtA, i, uint64(len(m.Query))) 1197 i-- 1198 dAtA[i] = 0x1a 1199 } 1200 if len(m.Name) > 0 { 1201 i -= len(m.Name) 1202 copy(dAtA[i:], m.Name) 1203 i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) 1204 i-- 1205 dAtA[i] = 0x12 1206 } 1207 if m.State != 0 { 1208 i = encodeVarintRpc(dAtA, i, uint64(m.State)) 1209 i-- 1210 dAtA[i] = 0x8 1211 } 1212 return len(dAtA) - i, nil 1213 } 1214 1215 func (m *RecordingRule) Marshal() (dAtA []byte, err error) { 1216 size := m.Size() 1217 dAtA = make([]byte, size) 1218 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1219 if err != nil { 1220 return nil, err 1221 } 1222 return dAtA[:n], nil 1223 } 1224 1225 func (m *RecordingRule) MarshalTo(dAtA []byte) (int, error) { 1226 size := m.Size() 1227 return m.MarshalToSizedBuffer(dAtA[:size]) 1228 } 1229 1230 func (m *RecordingRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1231 i := len(dAtA) 1232 _ = i 1233 var l int 1234 _ = l 1235 n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastEvaluation, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation):]) 1236 if err11 != nil { 1237 return 0, err11 1238 } 1239 i -= n11 1240 i = encodeVarintRpc(dAtA, i, uint64(n11)) 1241 i-- 1242 dAtA[i] = 0x3a 1243 if m.EvaluationDurationSeconds != 0 { 1244 i -= 8 1245 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.EvaluationDurationSeconds)))) 1246 i-- 1247 dAtA[i] = 0x31 1248 } 1249 if len(m.LastError) > 0 { 1250 i -= len(m.LastError) 1251 copy(dAtA[i:], m.LastError) 1252 i = encodeVarintRpc(dAtA, i, uint64(len(m.LastError))) 1253 i-- 1254 dAtA[i] = 0x2a 1255 } 1256 if len(m.Health) > 0 { 1257 i -= len(m.Health) 1258 copy(dAtA[i:], m.Health) 1259 i = encodeVarintRpc(dAtA, i, uint64(len(m.Health))) 1260 i-- 1261 dAtA[i] = 0x22 1262 } 1263 { 1264 size, err := m.Labels.MarshalToSizedBuffer(dAtA[:i]) 1265 if err != nil { 1266 return 0, err 1267 } 1268 i -= size 1269 i = encodeVarintRpc(dAtA, i, uint64(size)) 1270 } 1271 i-- 1272 dAtA[i] = 0x1a 1273 if len(m.Query) > 0 { 1274 i -= len(m.Query) 1275 copy(dAtA[i:], m.Query) 1276 i = encodeVarintRpc(dAtA, i, uint64(len(m.Query))) 1277 i-- 1278 dAtA[i] = 0x12 1279 } 1280 if len(m.Name) > 0 { 1281 i -= len(m.Name) 1282 copy(dAtA[i:], m.Name) 1283 i = encodeVarintRpc(dAtA, i, uint64(len(m.Name))) 1284 i-- 1285 dAtA[i] = 0xa 1286 } 1287 return len(dAtA) - i, nil 1288 } 1289 1290 func encodeVarintRpc(dAtA []byte, offset int, v uint64) int { 1291 offset -= sovRpc(v) 1292 base := offset 1293 for v >= 1<<7 { 1294 dAtA[offset] = uint8(v&0x7f | 0x80) 1295 v >>= 7 1296 offset++ 1297 } 1298 dAtA[offset] = uint8(v) 1299 return base 1300 } 1301 func (m *RulesRequest) Size() (n int) { 1302 if m == nil { 1303 return 0 1304 } 1305 var l int 1306 _ = l 1307 if m.Type != 0 { 1308 n += 1 + sovRpc(uint64(m.Type)) 1309 } 1310 if m.PartialResponseStrategy != 0 { 1311 n += 1 + sovRpc(uint64(m.PartialResponseStrategy)) 1312 } 1313 if len(m.MatcherString) > 0 { 1314 for _, s := range m.MatcherString { 1315 l = len(s) 1316 n += 1 + l + sovRpc(uint64(l)) 1317 } 1318 } 1319 return n 1320 } 1321 1322 func (m *RulesResponse) Size() (n int) { 1323 if m == nil { 1324 return 0 1325 } 1326 var l int 1327 _ = l 1328 if m.Result != nil { 1329 n += m.Result.Size() 1330 } 1331 return n 1332 } 1333 1334 func (m *RulesResponse_Group) Size() (n int) { 1335 if m == nil { 1336 return 0 1337 } 1338 var l int 1339 _ = l 1340 if m.Group != nil { 1341 l = m.Group.Size() 1342 n += 1 + l + sovRpc(uint64(l)) 1343 } 1344 return n 1345 } 1346 func (m *RulesResponse_Warning) Size() (n int) { 1347 if m == nil { 1348 return 0 1349 } 1350 var l int 1351 _ = l 1352 l = len(m.Warning) 1353 n += 1 + l + sovRpc(uint64(l)) 1354 return n 1355 } 1356 func (m *RuleGroups) Size() (n int) { 1357 if m == nil { 1358 return 0 1359 } 1360 var l int 1361 _ = l 1362 if len(m.Groups) > 0 { 1363 for _, e := range m.Groups { 1364 l = e.Size() 1365 n += 1 + l + sovRpc(uint64(l)) 1366 } 1367 } 1368 return n 1369 } 1370 1371 func (m *RuleGroup) Size() (n int) { 1372 if m == nil { 1373 return 0 1374 } 1375 var l int 1376 _ = l 1377 l = len(m.Name) 1378 if l > 0 { 1379 n += 1 + l + sovRpc(uint64(l)) 1380 } 1381 l = len(m.File) 1382 if l > 0 { 1383 n += 1 + l + sovRpc(uint64(l)) 1384 } 1385 if len(m.Rules) > 0 { 1386 for _, e := range m.Rules { 1387 l = e.Size() 1388 n += 1 + l + sovRpc(uint64(l)) 1389 } 1390 } 1391 if m.Interval != 0 { 1392 n += 9 1393 } 1394 if m.EvaluationDurationSeconds != 0 { 1395 n += 9 1396 } 1397 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation) 1398 n += 1 + l + sovRpc(uint64(l)) 1399 if m.PartialResponseStrategy != 0 { 1400 n += 1 + sovRpc(uint64(m.PartialResponseStrategy)) 1401 } 1402 if m.Limit != 0 { 1403 n += 1 + sovRpc(uint64(m.Limit)) 1404 } 1405 return n 1406 } 1407 1408 func (m *Rule) Size() (n int) { 1409 if m == nil { 1410 return 0 1411 } 1412 var l int 1413 _ = l 1414 if m.Result != nil { 1415 n += m.Result.Size() 1416 } 1417 return n 1418 } 1419 1420 func (m *Rule_Recording) Size() (n int) { 1421 if m == nil { 1422 return 0 1423 } 1424 var l int 1425 _ = l 1426 if m.Recording != nil { 1427 l = m.Recording.Size() 1428 n += 1 + l + sovRpc(uint64(l)) 1429 } 1430 return n 1431 } 1432 func (m *Rule_Alert) Size() (n int) { 1433 if m == nil { 1434 return 0 1435 } 1436 var l int 1437 _ = l 1438 if m.Alert != nil { 1439 l = m.Alert.Size() 1440 n += 1 + l + sovRpc(uint64(l)) 1441 } 1442 return n 1443 } 1444 func (m *AlertInstance) Size() (n int) { 1445 if m == nil { 1446 return 0 1447 } 1448 var l int 1449 _ = l 1450 l = m.Labels.Size() 1451 n += 1 + l + sovRpc(uint64(l)) 1452 l = m.Annotations.Size() 1453 n += 1 + l + sovRpc(uint64(l)) 1454 if m.State != 0 { 1455 n += 1 + sovRpc(uint64(m.State)) 1456 } 1457 if m.ActiveAt != nil { 1458 l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.ActiveAt) 1459 n += 1 + l + sovRpc(uint64(l)) 1460 } 1461 l = len(m.Value) 1462 if l > 0 { 1463 n += 1 + l + sovRpc(uint64(l)) 1464 } 1465 if m.PartialResponseStrategy != 0 { 1466 n += 1 + sovRpc(uint64(m.PartialResponseStrategy)) 1467 } 1468 return n 1469 } 1470 1471 func (m *Alert) Size() (n int) { 1472 if m == nil { 1473 return 0 1474 } 1475 var l int 1476 _ = l 1477 if m.State != 0 { 1478 n += 1 + sovRpc(uint64(m.State)) 1479 } 1480 l = len(m.Name) 1481 if l > 0 { 1482 n += 1 + l + sovRpc(uint64(l)) 1483 } 1484 l = len(m.Query) 1485 if l > 0 { 1486 n += 1 + l + sovRpc(uint64(l)) 1487 } 1488 if m.DurationSeconds != 0 { 1489 n += 9 1490 } 1491 l = m.Labels.Size() 1492 n += 1 + l + sovRpc(uint64(l)) 1493 l = m.Annotations.Size() 1494 n += 1 + l + sovRpc(uint64(l)) 1495 if len(m.Alerts) > 0 { 1496 for _, e := range m.Alerts { 1497 l = e.Size() 1498 n += 1 + l + sovRpc(uint64(l)) 1499 } 1500 } 1501 l = len(m.Health) 1502 if l > 0 { 1503 n += 1 + l + sovRpc(uint64(l)) 1504 } 1505 l = len(m.LastError) 1506 if l > 0 { 1507 n += 1 + l + sovRpc(uint64(l)) 1508 } 1509 if m.EvaluationDurationSeconds != 0 { 1510 n += 9 1511 } 1512 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation) 1513 n += 1 + l + sovRpc(uint64(l)) 1514 return n 1515 } 1516 1517 func (m *RecordingRule) Size() (n int) { 1518 if m == nil { 1519 return 0 1520 } 1521 var l int 1522 _ = l 1523 l = len(m.Name) 1524 if l > 0 { 1525 n += 1 + l + sovRpc(uint64(l)) 1526 } 1527 l = len(m.Query) 1528 if l > 0 { 1529 n += 1 + l + sovRpc(uint64(l)) 1530 } 1531 l = m.Labels.Size() 1532 n += 1 + l + sovRpc(uint64(l)) 1533 l = len(m.Health) 1534 if l > 0 { 1535 n += 1 + l + sovRpc(uint64(l)) 1536 } 1537 l = len(m.LastError) 1538 if l > 0 { 1539 n += 1 + l + sovRpc(uint64(l)) 1540 } 1541 if m.EvaluationDurationSeconds != 0 { 1542 n += 9 1543 } 1544 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastEvaluation) 1545 n += 1 + l + sovRpc(uint64(l)) 1546 return n 1547 } 1548 1549 func sovRpc(x uint64) (n int) { 1550 return (math_bits.Len64(x|1) + 6) / 7 1551 } 1552 func sozRpc(x uint64) (n int) { 1553 return sovRpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1554 } 1555 func (m *RulesRequest) Unmarshal(dAtA []byte) error { 1556 l := len(dAtA) 1557 iNdEx := 0 1558 for iNdEx < l { 1559 preIndex := iNdEx 1560 var wire uint64 1561 for shift := uint(0); ; shift += 7 { 1562 if shift >= 64 { 1563 return ErrIntOverflowRpc 1564 } 1565 if iNdEx >= l { 1566 return io.ErrUnexpectedEOF 1567 } 1568 b := dAtA[iNdEx] 1569 iNdEx++ 1570 wire |= uint64(b&0x7F) << shift 1571 if b < 0x80 { 1572 break 1573 } 1574 } 1575 fieldNum := int32(wire >> 3) 1576 wireType := int(wire & 0x7) 1577 if wireType == 4 { 1578 return fmt.Errorf("proto: RulesRequest: wiretype end group for non-group") 1579 } 1580 if fieldNum <= 0 { 1581 return fmt.Errorf("proto: RulesRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1582 } 1583 switch fieldNum { 1584 case 1: 1585 if wireType != 0 { 1586 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 1587 } 1588 m.Type = 0 1589 for shift := uint(0); ; shift += 7 { 1590 if shift >= 64 { 1591 return ErrIntOverflowRpc 1592 } 1593 if iNdEx >= l { 1594 return io.ErrUnexpectedEOF 1595 } 1596 b := dAtA[iNdEx] 1597 iNdEx++ 1598 m.Type |= RulesRequest_Type(b&0x7F) << shift 1599 if b < 0x80 { 1600 break 1601 } 1602 } 1603 case 2: 1604 if wireType != 0 { 1605 return fmt.Errorf("proto: wrong wireType = %d for field PartialResponseStrategy", wireType) 1606 } 1607 m.PartialResponseStrategy = 0 1608 for shift := uint(0); ; shift += 7 { 1609 if shift >= 64 { 1610 return ErrIntOverflowRpc 1611 } 1612 if iNdEx >= l { 1613 return io.ErrUnexpectedEOF 1614 } 1615 b := dAtA[iNdEx] 1616 iNdEx++ 1617 m.PartialResponseStrategy |= storepb.PartialResponseStrategy(b&0x7F) << shift 1618 if b < 0x80 { 1619 break 1620 } 1621 } 1622 case 3: 1623 if wireType != 2 { 1624 return fmt.Errorf("proto: wrong wireType = %d for field MatcherString", wireType) 1625 } 1626 var stringLen uint64 1627 for shift := uint(0); ; shift += 7 { 1628 if shift >= 64 { 1629 return ErrIntOverflowRpc 1630 } 1631 if iNdEx >= l { 1632 return io.ErrUnexpectedEOF 1633 } 1634 b := dAtA[iNdEx] 1635 iNdEx++ 1636 stringLen |= uint64(b&0x7F) << shift 1637 if b < 0x80 { 1638 break 1639 } 1640 } 1641 intStringLen := int(stringLen) 1642 if intStringLen < 0 { 1643 return ErrInvalidLengthRpc 1644 } 1645 postIndex := iNdEx + intStringLen 1646 if postIndex < 0 { 1647 return ErrInvalidLengthRpc 1648 } 1649 if postIndex > l { 1650 return io.ErrUnexpectedEOF 1651 } 1652 m.MatcherString = append(m.MatcherString, string(dAtA[iNdEx:postIndex])) 1653 iNdEx = postIndex 1654 default: 1655 iNdEx = preIndex 1656 skippy, err := skipRpc(dAtA[iNdEx:]) 1657 if err != nil { 1658 return err 1659 } 1660 if (skippy < 0) || (iNdEx+skippy) < 0 { 1661 return ErrInvalidLengthRpc 1662 } 1663 if (iNdEx + skippy) > l { 1664 return io.ErrUnexpectedEOF 1665 } 1666 iNdEx += skippy 1667 } 1668 } 1669 1670 if iNdEx > l { 1671 return io.ErrUnexpectedEOF 1672 } 1673 return nil 1674 } 1675 func (m *RulesResponse) Unmarshal(dAtA []byte) error { 1676 l := len(dAtA) 1677 iNdEx := 0 1678 for iNdEx < l { 1679 preIndex := iNdEx 1680 var wire uint64 1681 for shift := uint(0); ; shift += 7 { 1682 if shift >= 64 { 1683 return ErrIntOverflowRpc 1684 } 1685 if iNdEx >= l { 1686 return io.ErrUnexpectedEOF 1687 } 1688 b := dAtA[iNdEx] 1689 iNdEx++ 1690 wire |= uint64(b&0x7F) << shift 1691 if b < 0x80 { 1692 break 1693 } 1694 } 1695 fieldNum := int32(wire >> 3) 1696 wireType := int(wire & 0x7) 1697 if wireType == 4 { 1698 return fmt.Errorf("proto: RulesResponse: wiretype end group for non-group") 1699 } 1700 if fieldNum <= 0 { 1701 return fmt.Errorf("proto: RulesResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1702 } 1703 switch fieldNum { 1704 case 1: 1705 if wireType != 2 { 1706 return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) 1707 } 1708 var msglen int 1709 for shift := uint(0); ; shift += 7 { 1710 if shift >= 64 { 1711 return ErrIntOverflowRpc 1712 } 1713 if iNdEx >= l { 1714 return io.ErrUnexpectedEOF 1715 } 1716 b := dAtA[iNdEx] 1717 iNdEx++ 1718 msglen |= int(b&0x7F) << shift 1719 if b < 0x80 { 1720 break 1721 } 1722 } 1723 if msglen < 0 { 1724 return ErrInvalidLengthRpc 1725 } 1726 postIndex := iNdEx + msglen 1727 if postIndex < 0 { 1728 return ErrInvalidLengthRpc 1729 } 1730 if postIndex > l { 1731 return io.ErrUnexpectedEOF 1732 } 1733 v := &RuleGroup{} 1734 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1735 return err 1736 } 1737 m.Result = &RulesResponse_Group{v} 1738 iNdEx = postIndex 1739 case 2: 1740 if wireType != 2 { 1741 return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) 1742 } 1743 var stringLen uint64 1744 for shift := uint(0); ; shift += 7 { 1745 if shift >= 64 { 1746 return ErrIntOverflowRpc 1747 } 1748 if iNdEx >= l { 1749 return io.ErrUnexpectedEOF 1750 } 1751 b := dAtA[iNdEx] 1752 iNdEx++ 1753 stringLen |= uint64(b&0x7F) << shift 1754 if b < 0x80 { 1755 break 1756 } 1757 } 1758 intStringLen := int(stringLen) 1759 if intStringLen < 0 { 1760 return ErrInvalidLengthRpc 1761 } 1762 postIndex := iNdEx + intStringLen 1763 if postIndex < 0 { 1764 return ErrInvalidLengthRpc 1765 } 1766 if postIndex > l { 1767 return io.ErrUnexpectedEOF 1768 } 1769 m.Result = &RulesResponse_Warning{string(dAtA[iNdEx:postIndex])} 1770 iNdEx = postIndex 1771 default: 1772 iNdEx = preIndex 1773 skippy, err := skipRpc(dAtA[iNdEx:]) 1774 if err != nil { 1775 return err 1776 } 1777 if (skippy < 0) || (iNdEx+skippy) < 0 { 1778 return ErrInvalidLengthRpc 1779 } 1780 if (iNdEx + skippy) > l { 1781 return io.ErrUnexpectedEOF 1782 } 1783 iNdEx += skippy 1784 } 1785 } 1786 1787 if iNdEx > l { 1788 return io.ErrUnexpectedEOF 1789 } 1790 return nil 1791 } 1792 func (m *RuleGroups) Unmarshal(dAtA []byte) error { 1793 l := len(dAtA) 1794 iNdEx := 0 1795 for iNdEx < l { 1796 preIndex := iNdEx 1797 var wire uint64 1798 for shift := uint(0); ; shift += 7 { 1799 if shift >= 64 { 1800 return ErrIntOverflowRpc 1801 } 1802 if iNdEx >= l { 1803 return io.ErrUnexpectedEOF 1804 } 1805 b := dAtA[iNdEx] 1806 iNdEx++ 1807 wire |= uint64(b&0x7F) << shift 1808 if b < 0x80 { 1809 break 1810 } 1811 } 1812 fieldNum := int32(wire >> 3) 1813 wireType := int(wire & 0x7) 1814 if wireType == 4 { 1815 return fmt.Errorf("proto: RuleGroups: wiretype end group for non-group") 1816 } 1817 if fieldNum <= 0 { 1818 return fmt.Errorf("proto: RuleGroups: illegal tag %d (wire type %d)", fieldNum, wire) 1819 } 1820 switch fieldNum { 1821 case 1: 1822 if wireType != 2 { 1823 return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) 1824 } 1825 var msglen int 1826 for shift := uint(0); ; shift += 7 { 1827 if shift >= 64 { 1828 return ErrIntOverflowRpc 1829 } 1830 if iNdEx >= l { 1831 return io.ErrUnexpectedEOF 1832 } 1833 b := dAtA[iNdEx] 1834 iNdEx++ 1835 msglen |= int(b&0x7F) << shift 1836 if b < 0x80 { 1837 break 1838 } 1839 } 1840 if msglen < 0 { 1841 return ErrInvalidLengthRpc 1842 } 1843 postIndex := iNdEx + msglen 1844 if postIndex < 0 { 1845 return ErrInvalidLengthRpc 1846 } 1847 if postIndex > l { 1848 return io.ErrUnexpectedEOF 1849 } 1850 m.Groups = append(m.Groups, &RuleGroup{}) 1851 if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1852 return err 1853 } 1854 iNdEx = postIndex 1855 default: 1856 iNdEx = preIndex 1857 skippy, err := skipRpc(dAtA[iNdEx:]) 1858 if err != nil { 1859 return err 1860 } 1861 if (skippy < 0) || (iNdEx+skippy) < 0 { 1862 return ErrInvalidLengthRpc 1863 } 1864 if (iNdEx + skippy) > l { 1865 return io.ErrUnexpectedEOF 1866 } 1867 iNdEx += skippy 1868 } 1869 } 1870 1871 if iNdEx > l { 1872 return io.ErrUnexpectedEOF 1873 } 1874 return nil 1875 } 1876 func (m *RuleGroup) Unmarshal(dAtA []byte) error { 1877 l := len(dAtA) 1878 iNdEx := 0 1879 for iNdEx < l { 1880 preIndex := iNdEx 1881 var wire uint64 1882 for shift := uint(0); ; shift += 7 { 1883 if shift >= 64 { 1884 return ErrIntOverflowRpc 1885 } 1886 if iNdEx >= l { 1887 return io.ErrUnexpectedEOF 1888 } 1889 b := dAtA[iNdEx] 1890 iNdEx++ 1891 wire |= uint64(b&0x7F) << shift 1892 if b < 0x80 { 1893 break 1894 } 1895 } 1896 fieldNum := int32(wire >> 3) 1897 wireType := int(wire & 0x7) 1898 if wireType == 4 { 1899 return fmt.Errorf("proto: RuleGroup: wiretype end group for non-group") 1900 } 1901 if fieldNum <= 0 { 1902 return fmt.Errorf("proto: RuleGroup: illegal tag %d (wire type %d)", fieldNum, wire) 1903 } 1904 switch fieldNum { 1905 case 1: 1906 if wireType != 2 { 1907 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 1908 } 1909 var stringLen uint64 1910 for shift := uint(0); ; shift += 7 { 1911 if shift >= 64 { 1912 return ErrIntOverflowRpc 1913 } 1914 if iNdEx >= l { 1915 return io.ErrUnexpectedEOF 1916 } 1917 b := dAtA[iNdEx] 1918 iNdEx++ 1919 stringLen |= uint64(b&0x7F) << shift 1920 if b < 0x80 { 1921 break 1922 } 1923 } 1924 intStringLen := int(stringLen) 1925 if intStringLen < 0 { 1926 return ErrInvalidLengthRpc 1927 } 1928 postIndex := iNdEx + intStringLen 1929 if postIndex < 0 { 1930 return ErrInvalidLengthRpc 1931 } 1932 if postIndex > l { 1933 return io.ErrUnexpectedEOF 1934 } 1935 m.Name = string(dAtA[iNdEx:postIndex]) 1936 iNdEx = postIndex 1937 case 2: 1938 if wireType != 2 { 1939 return fmt.Errorf("proto: wrong wireType = %d for field File", wireType) 1940 } 1941 var stringLen uint64 1942 for shift := uint(0); ; shift += 7 { 1943 if shift >= 64 { 1944 return ErrIntOverflowRpc 1945 } 1946 if iNdEx >= l { 1947 return io.ErrUnexpectedEOF 1948 } 1949 b := dAtA[iNdEx] 1950 iNdEx++ 1951 stringLen |= uint64(b&0x7F) << shift 1952 if b < 0x80 { 1953 break 1954 } 1955 } 1956 intStringLen := int(stringLen) 1957 if intStringLen < 0 { 1958 return ErrInvalidLengthRpc 1959 } 1960 postIndex := iNdEx + intStringLen 1961 if postIndex < 0 { 1962 return ErrInvalidLengthRpc 1963 } 1964 if postIndex > l { 1965 return io.ErrUnexpectedEOF 1966 } 1967 m.File = string(dAtA[iNdEx:postIndex]) 1968 iNdEx = postIndex 1969 case 3: 1970 if wireType != 2 { 1971 return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) 1972 } 1973 var msglen int 1974 for shift := uint(0); ; shift += 7 { 1975 if shift >= 64 { 1976 return ErrIntOverflowRpc 1977 } 1978 if iNdEx >= l { 1979 return io.ErrUnexpectedEOF 1980 } 1981 b := dAtA[iNdEx] 1982 iNdEx++ 1983 msglen |= int(b&0x7F) << shift 1984 if b < 0x80 { 1985 break 1986 } 1987 } 1988 if msglen < 0 { 1989 return ErrInvalidLengthRpc 1990 } 1991 postIndex := iNdEx + msglen 1992 if postIndex < 0 { 1993 return ErrInvalidLengthRpc 1994 } 1995 if postIndex > l { 1996 return io.ErrUnexpectedEOF 1997 } 1998 m.Rules = append(m.Rules, &Rule{}) 1999 if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2000 return err 2001 } 2002 iNdEx = postIndex 2003 case 4: 2004 if wireType != 1 { 2005 return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) 2006 } 2007 var v uint64 2008 if (iNdEx + 8) > l { 2009 return io.ErrUnexpectedEOF 2010 } 2011 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 2012 iNdEx += 8 2013 m.Interval = float64(math.Float64frombits(v)) 2014 case 5: 2015 if wireType != 1 { 2016 return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDurationSeconds", wireType) 2017 } 2018 var v uint64 2019 if (iNdEx + 8) > l { 2020 return io.ErrUnexpectedEOF 2021 } 2022 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 2023 iNdEx += 8 2024 m.EvaluationDurationSeconds = float64(math.Float64frombits(v)) 2025 case 6: 2026 if wireType != 2 { 2027 return fmt.Errorf("proto: wrong wireType = %d for field LastEvaluation", wireType) 2028 } 2029 var msglen int 2030 for shift := uint(0); ; shift += 7 { 2031 if shift >= 64 { 2032 return ErrIntOverflowRpc 2033 } 2034 if iNdEx >= l { 2035 return io.ErrUnexpectedEOF 2036 } 2037 b := dAtA[iNdEx] 2038 iNdEx++ 2039 msglen |= int(b&0x7F) << shift 2040 if b < 0x80 { 2041 break 2042 } 2043 } 2044 if msglen < 0 { 2045 return ErrInvalidLengthRpc 2046 } 2047 postIndex := iNdEx + msglen 2048 if postIndex < 0 { 2049 return ErrInvalidLengthRpc 2050 } 2051 if postIndex > l { 2052 return io.ErrUnexpectedEOF 2053 } 2054 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastEvaluation, dAtA[iNdEx:postIndex]); err != nil { 2055 return err 2056 } 2057 iNdEx = postIndex 2058 case 8: 2059 if wireType != 0 { 2060 return fmt.Errorf("proto: wrong wireType = %d for field PartialResponseStrategy", wireType) 2061 } 2062 m.PartialResponseStrategy = 0 2063 for shift := uint(0); ; shift += 7 { 2064 if shift >= 64 { 2065 return ErrIntOverflowRpc 2066 } 2067 if iNdEx >= l { 2068 return io.ErrUnexpectedEOF 2069 } 2070 b := dAtA[iNdEx] 2071 iNdEx++ 2072 m.PartialResponseStrategy |= storepb.PartialResponseStrategy(b&0x7F) << shift 2073 if b < 0x80 { 2074 break 2075 } 2076 } 2077 case 9: 2078 if wireType != 0 { 2079 return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) 2080 } 2081 m.Limit = 0 2082 for shift := uint(0); ; shift += 7 { 2083 if shift >= 64 { 2084 return ErrIntOverflowRpc 2085 } 2086 if iNdEx >= l { 2087 return io.ErrUnexpectedEOF 2088 } 2089 b := dAtA[iNdEx] 2090 iNdEx++ 2091 m.Limit |= int64(b&0x7F) << shift 2092 if b < 0x80 { 2093 break 2094 } 2095 } 2096 default: 2097 iNdEx = preIndex 2098 skippy, err := skipRpc(dAtA[iNdEx:]) 2099 if err != nil { 2100 return err 2101 } 2102 if (skippy < 0) || (iNdEx+skippy) < 0 { 2103 return ErrInvalidLengthRpc 2104 } 2105 if (iNdEx + skippy) > l { 2106 return io.ErrUnexpectedEOF 2107 } 2108 iNdEx += skippy 2109 } 2110 } 2111 2112 if iNdEx > l { 2113 return io.ErrUnexpectedEOF 2114 } 2115 return nil 2116 } 2117 func (m *Rule) Unmarshal(dAtA []byte) error { 2118 l := len(dAtA) 2119 iNdEx := 0 2120 for iNdEx < l { 2121 preIndex := iNdEx 2122 var wire uint64 2123 for shift := uint(0); ; shift += 7 { 2124 if shift >= 64 { 2125 return ErrIntOverflowRpc 2126 } 2127 if iNdEx >= l { 2128 return io.ErrUnexpectedEOF 2129 } 2130 b := dAtA[iNdEx] 2131 iNdEx++ 2132 wire |= uint64(b&0x7F) << shift 2133 if b < 0x80 { 2134 break 2135 } 2136 } 2137 fieldNum := int32(wire >> 3) 2138 wireType := int(wire & 0x7) 2139 if wireType == 4 { 2140 return fmt.Errorf("proto: Rule: wiretype end group for non-group") 2141 } 2142 if fieldNum <= 0 { 2143 return fmt.Errorf("proto: Rule: illegal tag %d (wire type %d)", fieldNum, wire) 2144 } 2145 switch fieldNum { 2146 case 1: 2147 if wireType != 2 { 2148 return fmt.Errorf("proto: wrong wireType = %d for field Recording", wireType) 2149 } 2150 var msglen int 2151 for shift := uint(0); ; shift += 7 { 2152 if shift >= 64 { 2153 return ErrIntOverflowRpc 2154 } 2155 if iNdEx >= l { 2156 return io.ErrUnexpectedEOF 2157 } 2158 b := dAtA[iNdEx] 2159 iNdEx++ 2160 msglen |= int(b&0x7F) << shift 2161 if b < 0x80 { 2162 break 2163 } 2164 } 2165 if msglen < 0 { 2166 return ErrInvalidLengthRpc 2167 } 2168 postIndex := iNdEx + msglen 2169 if postIndex < 0 { 2170 return ErrInvalidLengthRpc 2171 } 2172 if postIndex > l { 2173 return io.ErrUnexpectedEOF 2174 } 2175 v := &RecordingRule{} 2176 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2177 return err 2178 } 2179 m.Result = &Rule_Recording{v} 2180 iNdEx = postIndex 2181 case 2: 2182 if wireType != 2 { 2183 return fmt.Errorf("proto: wrong wireType = %d for field Alert", wireType) 2184 } 2185 var msglen int 2186 for shift := uint(0); ; shift += 7 { 2187 if shift >= 64 { 2188 return ErrIntOverflowRpc 2189 } 2190 if iNdEx >= l { 2191 return io.ErrUnexpectedEOF 2192 } 2193 b := dAtA[iNdEx] 2194 iNdEx++ 2195 msglen |= int(b&0x7F) << shift 2196 if b < 0x80 { 2197 break 2198 } 2199 } 2200 if msglen < 0 { 2201 return ErrInvalidLengthRpc 2202 } 2203 postIndex := iNdEx + msglen 2204 if postIndex < 0 { 2205 return ErrInvalidLengthRpc 2206 } 2207 if postIndex > l { 2208 return io.ErrUnexpectedEOF 2209 } 2210 v := &Alert{} 2211 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2212 return err 2213 } 2214 m.Result = &Rule_Alert{v} 2215 iNdEx = postIndex 2216 default: 2217 iNdEx = preIndex 2218 skippy, err := skipRpc(dAtA[iNdEx:]) 2219 if err != nil { 2220 return err 2221 } 2222 if (skippy < 0) || (iNdEx+skippy) < 0 { 2223 return ErrInvalidLengthRpc 2224 } 2225 if (iNdEx + skippy) > l { 2226 return io.ErrUnexpectedEOF 2227 } 2228 iNdEx += skippy 2229 } 2230 } 2231 2232 if iNdEx > l { 2233 return io.ErrUnexpectedEOF 2234 } 2235 return nil 2236 } 2237 func (m *AlertInstance) Unmarshal(dAtA []byte) error { 2238 l := len(dAtA) 2239 iNdEx := 0 2240 for iNdEx < l { 2241 preIndex := iNdEx 2242 var wire uint64 2243 for shift := uint(0); ; shift += 7 { 2244 if shift >= 64 { 2245 return ErrIntOverflowRpc 2246 } 2247 if iNdEx >= l { 2248 return io.ErrUnexpectedEOF 2249 } 2250 b := dAtA[iNdEx] 2251 iNdEx++ 2252 wire |= uint64(b&0x7F) << shift 2253 if b < 0x80 { 2254 break 2255 } 2256 } 2257 fieldNum := int32(wire >> 3) 2258 wireType := int(wire & 0x7) 2259 if wireType == 4 { 2260 return fmt.Errorf("proto: AlertInstance: wiretype end group for non-group") 2261 } 2262 if fieldNum <= 0 { 2263 return fmt.Errorf("proto: AlertInstance: illegal tag %d (wire type %d)", fieldNum, wire) 2264 } 2265 switch fieldNum { 2266 case 1: 2267 if wireType != 2 { 2268 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 2269 } 2270 var msglen int 2271 for shift := uint(0); ; shift += 7 { 2272 if shift >= 64 { 2273 return ErrIntOverflowRpc 2274 } 2275 if iNdEx >= l { 2276 return io.ErrUnexpectedEOF 2277 } 2278 b := dAtA[iNdEx] 2279 iNdEx++ 2280 msglen |= int(b&0x7F) << shift 2281 if b < 0x80 { 2282 break 2283 } 2284 } 2285 if msglen < 0 { 2286 return ErrInvalidLengthRpc 2287 } 2288 postIndex := iNdEx + msglen 2289 if postIndex < 0 { 2290 return ErrInvalidLengthRpc 2291 } 2292 if postIndex > l { 2293 return io.ErrUnexpectedEOF 2294 } 2295 if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2296 return err 2297 } 2298 iNdEx = postIndex 2299 case 2: 2300 if wireType != 2 { 2301 return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) 2302 } 2303 var msglen int 2304 for shift := uint(0); ; shift += 7 { 2305 if shift >= 64 { 2306 return ErrIntOverflowRpc 2307 } 2308 if iNdEx >= l { 2309 return io.ErrUnexpectedEOF 2310 } 2311 b := dAtA[iNdEx] 2312 iNdEx++ 2313 msglen |= int(b&0x7F) << shift 2314 if b < 0x80 { 2315 break 2316 } 2317 } 2318 if msglen < 0 { 2319 return ErrInvalidLengthRpc 2320 } 2321 postIndex := iNdEx + msglen 2322 if postIndex < 0 { 2323 return ErrInvalidLengthRpc 2324 } 2325 if postIndex > l { 2326 return io.ErrUnexpectedEOF 2327 } 2328 if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2329 return err 2330 } 2331 iNdEx = postIndex 2332 case 3: 2333 if wireType != 0 { 2334 return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) 2335 } 2336 m.State = 0 2337 for shift := uint(0); ; shift += 7 { 2338 if shift >= 64 { 2339 return ErrIntOverflowRpc 2340 } 2341 if iNdEx >= l { 2342 return io.ErrUnexpectedEOF 2343 } 2344 b := dAtA[iNdEx] 2345 iNdEx++ 2346 m.State |= AlertState(b&0x7F) << shift 2347 if b < 0x80 { 2348 break 2349 } 2350 } 2351 case 4: 2352 if wireType != 2 { 2353 return fmt.Errorf("proto: wrong wireType = %d for field ActiveAt", wireType) 2354 } 2355 var msglen int 2356 for shift := uint(0); ; shift += 7 { 2357 if shift >= 64 { 2358 return ErrIntOverflowRpc 2359 } 2360 if iNdEx >= l { 2361 return io.ErrUnexpectedEOF 2362 } 2363 b := dAtA[iNdEx] 2364 iNdEx++ 2365 msglen |= int(b&0x7F) << shift 2366 if b < 0x80 { 2367 break 2368 } 2369 } 2370 if msglen < 0 { 2371 return ErrInvalidLengthRpc 2372 } 2373 postIndex := iNdEx + msglen 2374 if postIndex < 0 { 2375 return ErrInvalidLengthRpc 2376 } 2377 if postIndex > l { 2378 return io.ErrUnexpectedEOF 2379 } 2380 if m.ActiveAt == nil { 2381 m.ActiveAt = new(time.Time) 2382 } 2383 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.ActiveAt, dAtA[iNdEx:postIndex]); err != nil { 2384 return err 2385 } 2386 iNdEx = postIndex 2387 case 5: 2388 if wireType != 2 { 2389 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 2390 } 2391 var stringLen uint64 2392 for shift := uint(0); ; shift += 7 { 2393 if shift >= 64 { 2394 return ErrIntOverflowRpc 2395 } 2396 if iNdEx >= l { 2397 return io.ErrUnexpectedEOF 2398 } 2399 b := dAtA[iNdEx] 2400 iNdEx++ 2401 stringLen |= uint64(b&0x7F) << shift 2402 if b < 0x80 { 2403 break 2404 } 2405 } 2406 intStringLen := int(stringLen) 2407 if intStringLen < 0 { 2408 return ErrInvalidLengthRpc 2409 } 2410 postIndex := iNdEx + intStringLen 2411 if postIndex < 0 { 2412 return ErrInvalidLengthRpc 2413 } 2414 if postIndex > l { 2415 return io.ErrUnexpectedEOF 2416 } 2417 m.Value = string(dAtA[iNdEx:postIndex]) 2418 iNdEx = postIndex 2419 case 6: 2420 if wireType != 0 { 2421 return fmt.Errorf("proto: wrong wireType = %d for field PartialResponseStrategy", wireType) 2422 } 2423 m.PartialResponseStrategy = 0 2424 for shift := uint(0); ; shift += 7 { 2425 if shift >= 64 { 2426 return ErrIntOverflowRpc 2427 } 2428 if iNdEx >= l { 2429 return io.ErrUnexpectedEOF 2430 } 2431 b := dAtA[iNdEx] 2432 iNdEx++ 2433 m.PartialResponseStrategy |= storepb.PartialResponseStrategy(b&0x7F) << shift 2434 if b < 0x80 { 2435 break 2436 } 2437 } 2438 default: 2439 iNdEx = preIndex 2440 skippy, err := skipRpc(dAtA[iNdEx:]) 2441 if err != nil { 2442 return err 2443 } 2444 if (skippy < 0) || (iNdEx+skippy) < 0 { 2445 return ErrInvalidLengthRpc 2446 } 2447 if (iNdEx + skippy) > l { 2448 return io.ErrUnexpectedEOF 2449 } 2450 iNdEx += skippy 2451 } 2452 } 2453 2454 if iNdEx > l { 2455 return io.ErrUnexpectedEOF 2456 } 2457 return nil 2458 } 2459 func (m *Alert) Unmarshal(dAtA []byte) error { 2460 l := len(dAtA) 2461 iNdEx := 0 2462 for iNdEx < l { 2463 preIndex := iNdEx 2464 var wire uint64 2465 for shift := uint(0); ; shift += 7 { 2466 if shift >= 64 { 2467 return ErrIntOverflowRpc 2468 } 2469 if iNdEx >= l { 2470 return io.ErrUnexpectedEOF 2471 } 2472 b := dAtA[iNdEx] 2473 iNdEx++ 2474 wire |= uint64(b&0x7F) << shift 2475 if b < 0x80 { 2476 break 2477 } 2478 } 2479 fieldNum := int32(wire >> 3) 2480 wireType := int(wire & 0x7) 2481 if wireType == 4 { 2482 return fmt.Errorf("proto: Alert: wiretype end group for non-group") 2483 } 2484 if fieldNum <= 0 { 2485 return fmt.Errorf("proto: Alert: illegal tag %d (wire type %d)", fieldNum, wire) 2486 } 2487 switch fieldNum { 2488 case 1: 2489 if wireType != 0 { 2490 return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) 2491 } 2492 m.State = 0 2493 for shift := uint(0); ; shift += 7 { 2494 if shift >= 64 { 2495 return ErrIntOverflowRpc 2496 } 2497 if iNdEx >= l { 2498 return io.ErrUnexpectedEOF 2499 } 2500 b := dAtA[iNdEx] 2501 iNdEx++ 2502 m.State |= AlertState(b&0x7F) << shift 2503 if b < 0x80 { 2504 break 2505 } 2506 } 2507 case 2: 2508 if wireType != 2 { 2509 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2510 } 2511 var stringLen uint64 2512 for shift := uint(0); ; shift += 7 { 2513 if shift >= 64 { 2514 return ErrIntOverflowRpc 2515 } 2516 if iNdEx >= l { 2517 return io.ErrUnexpectedEOF 2518 } 2519 b := dAtA[iNdEx] 2520 iNdEx++ 2521 stringLen |= uint64(b&0x7F) << shift 2522 if b < 0x80 { 2523 break 2524 } 2525 } 2526 intStringLen := int(stringLen) 2527 if intStringLen < 0 { 2528 return ErrInvalidLengthRpc 2529 } 2530 postIndex := iNdEx + intStringLen 2531 if postIndex < 0 { 2532 return ErrInvalidLengthRpc 2533 } 2534 if postIndex > l { 2535 return io.ErrUnexpectedEOF 2536 } 2537 m.Name = string(dAtA[iNdEx:postIndex]) 2538 iNdEx = postIndex 2539 case 3: 2540 if wireType != 2 { 2541 return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) 2542 } 2543 var stringLen uint64 2544 for shift := uint(0); ; shift += 7 { 2545 if shift >= 64 { 2546 return ErrIntOverflowRpc 2547 } 2548 if iNdEx >= l { 2549 return io.ErrUnexpectedEOF 2550 } 2551 b := dAtA[iNdEx] 2552 iNdEx++ 2553 stringLen |= uint64(b&0x7F) << shift 2554 if b < 0x80 { 2555 break 2556 } 2557 } 2558 intStringLen := int(stringLen) 2559 if intStringLen < 0 { 2560 return ErrInvalidLengthRpc 2561 } 2562 postIndex := iNdEx + intStringLen 2563 if postIndex < 0 { 2564 return ErrInvalidLengthRpc 2565 } 2566 if postIndex > l { 2567 return io.ErrUnexpectedEOF 2568 } 2569 m.Query = string(dAtA[iNdEx:postIndex]) 2570 iNdEx = postIndex 2571 case 4: 2572 if wireType != 1 { 2573 return fmt.Errorf("proto: wrong wireType = %d for field DurationSeconds", wireType) 2574 } 2575 var v uint64 2576 if (iNdEx + 8) > l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 2580 iNdEx += 8 2581 m.DurationSeconds = float64(math.Float64frombits(v)) 2582 case 5: 2583 if wireType != 2 { 2584 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 2585 } 2586 var msglen int 2587 for shift := uint(0); ; shift += 7 { 2588 if shift >= 64 { 2589 return ErrIntOverflowRpc 2590 } 2591 if iNdEx >= l { 2592 return io.ErrUnexpectedEOF 2593 } 2594 b := dAtA[iNdEx] 2595 iNdEx++ 2596 msglen |= int(b&0x7F) << shift 2597 if b < 0x80 { 2598 break 2599 } 2600 } 2601 if msglen < 0 { 2602 return ErrInvalidLengthRpc 2603 } 2604 postIndex := iNdEx + msglen 2605 if postIndex < 0 { 2606 return ErrInvalidLengthRpc 2607 } 2608 if postIndex > l { 2609 return io.ErrUnexpectedEOF 2610 } 2611 if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2612 return err 2613 } 2614 iNdEx = postIndex 2615 case 6: 2616 if wireType != 2 { 2617 return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) 2618 } 2619 var msglen int 2620 for shift := uint(0); ; shift += 7 { 2621 if shift >= 64 { 2622 return ErrIntOverflowRpc 2623 } 2624 if iNdEx >= l { 2625 return io.ErrUnexpectedEOF 2626 } 2627 b := dAtA[iNdEx] 2628 iNdEx++ 2629 msglen |= int(b&0x7F) << shift 2630 if b < 0x80 { 2631 break 2632 } 2633 } 2634 if msglen < 0 { 2635 return ErrInvalidLengthRpc 2636 } 2637 postIndex := iNdEx + msglen 2638 if postIndex < 0 { 2639 return ErrInvalidLengthRpc 2640 } 2641 if postIndex > l { 2642 return io.ErrUnexpectedEOF 2643 } 2644 if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2645 return err 2646 } 2647 iNdEx = postIndex 2648 case 7: 2649 if wireType != 2 { 2650 return fmt.Errorf("proto: wrong wireType = %d for field Alerts", wireType) 2651 } 2652 var msglen int 2653 for shift := uint(0); ; shift += 7 { 2654 if shift >= 64 { 2655 return ErrIntOverflowRpc 2656 } 2657 if iNdEx >= l { 2658 return io.ErrUnexpectedEOF 2659 } 2660 b := dAtA[iNdEx] 2661 iNdEx++ 2662 msglen |= int(b&0x7F) << shift 2663 if b < 0x80 { 2664 break 2665 } 2666 } 2667 if msglen < 0 { 2668 return ErrInvalidLengthRpc 2669 } 2670 postIndex := iNdEx + msglen 2671 if postIndex < 0 { 2672 return ErrInvalidLengthRpc 2673 } 2674 if postIndex > l { 2675 return io.ErrUnexpectedEOF 2676 } 2677 m.Alerts = append(m.Alerts, &AlertInstance{}) 2678 if err := m.Alerts[len(m.Alerts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2679 return err 2680 } 2681 iNdEx = postIndex 2682 case 8: 2683 if wireType != 2 { 2684 return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType) 2685 } 2686 var stringLen uint64 2687 for shift := uint(0); ; shift += 7 { 2688 if shift >= 64 { 2689 return ErrIntOverflowRpc 2690 } 2691 if iNdEx >= l { 2692 return io.ErrUnexpectedEOF 2693 } 2694 b := dAtA[iNdEx] 2695 iNdEx++ 2696 stringLen |= uint64(b&0x7F) << shift 2697 if b < 0x80 { 2698 break 2699 } 2700 } 2701 intStringLen := int(stringLen) 2702 if intStringLen < 0 { 2703 return ErrInvalidLengthRpc 2704 } 2705 postIndex := iNdEx + intStringLen 2706 if postIndex < 0 { 2707 return ErrInvalidLengthRpc 2708 } 2709 if postIndex > l { 2710 return io.ErrUnexpectedEOF 2711 } 2712 m.Health = string(dAtA[iNdEx:postIndex]) 2713 iNdEx = postIndex 2714 case 9: 2715 if wireType != 2 { 2716 return fmt.Errorf("proto: wrong wireType = %d for field LastError", wireType) 2717 } 2718 var stringLen uint64 2719 for shift := uint(0); ; shift += 7 { 2720 if shift >= 64 { 2721 return ErrIntOverflowRpc 2722 } 2723 if iNdEx >= l { 2724 return io.ErrUnexpectedEOF 2725 } 2726 b := dAtA[iNdEx] 2727 iNdEx++ 2728 stringLen |= uint64(b&0x7F) << shift 2729 if b < 0x80 { 2730 break 2731 } 2732 } 2733 intStringLen := int(stringLen) 2734 if intStringLen < 0 { 2735 return ErrInvalidLengthRpc 2736 } 2737 postIndex := iNdEx + intStringLen 2738 if postIndex < 0 { 2739 return ErrInvalidLengthRpc 2740 } 2741 if postIndex > l { 2742 return io.ErrUnexpectedEOF 2743 } 2744 m.LastError = string(dAtA[iNdEx:postIndex]) 2745 iNdEx = postIndex 2746 case 10: 2747 if wireType != 1 { 2748 return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDurationSeconds", wireType) 2749 } 2750 var v uint64 2751 if (iNdEx + 8) > l { 2752 return io.ErrUnexpectedEOF 2753 } 2754 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 2755 iNdEx += 8 2756 m.EvaluationDurationSeconds = float64(math.Float64frombits(v)) 2757 case 11: 2758 if wireType != 2 { 2759 return fmt.Errorf("proto: wrong wireType = %d for field LastEvaluation", wireType) 2760 } 2761 var msglen int 2762 for shift := uint(0); ; shift += 7 { 2763 if shift >= 64 { 2764 return ErrIntOverflowRpc 2765 } 2766 if iNdEx >= l { 2767 return io.ErrUnexpectedEOF 2768 } 2769 b := dAtA[iNdEx] 2770 iNdEx++ 2771 msglen |= int(b&0x7F) << shift 2772 if b < 0x80 { 2773 break 2774 } 2775 } 2776 if msglen < 0 { 2777 return ErrInvalidLengthRpc 2778 } 2779 postIndex := iNdEx + msglen 2780 if postIndex < 0 { 2781 return ErrInvalidLengthRpc 2782 } 2783 if postIndex > l { 2784 return io.ErrUnexpectedEOF 2785 } 2786 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastEvaluation, dAtA[iNdEx:postIndex]); err != nil { 2787 return err 2788 } 2789 iNdEx = postIndex 2790 default: 2791 iNdEx = preIndex 2792 skippy, err := skipRpc(dAtA[iNdEx:]) 2793 if err != nil { 2794 return err 2795 } 2796 if (skippy < 0) || (iNdEx+skippy) < 0 { 2797 return ErrInvalidLengthRpc 2798 } 2799 if (iNdEx + skippy) > l { 2800 return io.ErrUnexpectedEOF 2801 } 2802 iNdEx += skippy 2803 } 2804 } 2805 2806 if iNdEx > l { 2807 return io.ErrUnexpectedEOF 2808 } 2809 return nil 2810 } 2811 func (m *RecordingRule) Unmarshal(dAtA []byte) error { 2812 l := len(dAtA) 2813 iNdEx := 0 2814 for iNdEx < l { 2815 preIndex := iNdEx 2816 var wire uint64 2817 for shift := uint(0); ; shift += 7 { 2818 if shift >= 64 { 2819 return ErrIntOverflowRpc 2820 } 2821 if iNdEx >= l { 2822 return io.ErrUnexpectedEOF 2823 } 2824 b := dAtA[iNdEx] 2825 iNdEx++ 2826 wire |= uint64(b&0x7F) << shift 2827 if b < 0x80 { 2828 break 2829 } 2830 } 2831 fieldNum := int32(wire >> 3) 2832 wireType := int(wire & 0x7) 2833 if wireType == 4 { 2834 return fmt.Errorf("proto: RecordingRule: wiretype end group for non-group") 2835 } 2836 if fieldNum <= 0 { 2837 return fmt.Errorf("proto: RecordingRule: illegal tag %d (wire type %d)", fieldNum, wire) 2838 } 2839 switch fieldNum { 2840 case 1: 2841 if wireType != 2 { 2842 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2843 } 2844 var stringLen uint64 2845 for shift := uint(0); ; shift += 7 { 2846 if shift >= 64 { 2847 return ErrIntOverflowRpc 2848 } 2849 if iNdEx >= l { 2850 return io.ErrUnexpectedEOF 2851 } 2852 b := dAtA[iNdEx] 2853 iNdEx++ 2854 stringLen |= uint64(b&0x7F) << shift 2855 if b < 0x80 { 2856 break 2857 } 2858 } 2859 intStringLen := int(stringLen) 2860 if intStringLen < 0 { 2861 return ErrInvalidLengthRpc 2862 } 2863 postIndex := iNdEx + intStringLen 2864 if postIndex < 0 { 2865 return ErrInvalidLengthRpc 2866 } 2867 if postIndex > l { 2868 return io.ErrUnexpectedEOF 2869 } 2870 m.Name = string(dAtA[iNdEx:postIndex]) 2871 iNdEx = postIndex 2872 case 2: 2873 if wireType != 2 { 2874 return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) 2875 } 2876 var stringLen uint64 2877 for shift := uint(0); ; shift += 7 { 2878 if shift >= 64 { 2879 return ErrIntOverflowRpc 2880 } 2881 if iNdEx >= l { 2882 return io.ErrUnexpectedEOF 2883 } 2884 b := dAtA[iNdEx] 2885 iNdEx++ 2886 stringLen |= uint64(b&0x7F) << shift 2887 if b < 0x80 { 2888 break 2889 } 2890 } 2891 intStringLen := int(stringLen) 2892 if intStringLen < 0 { 2893 return ErrInvalidLengthRpc 2894 } 2895 postIndex := iNdEx + intStringLen 2896 if postIndex < 0 { 2897 return ErrInvalidLengthRpc 2898 } 2899 if postIndex > l { 2900 return io.ErrUnexpectedEOF 2901 } 2902 m.Query = string(dAtA[iNdEx:postIndex]) 2903 iNdEx = postIndex 2904 case 3: 2905 if wireType != 2 { 2906 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 2907 } 2908 var msglen int 2909 for shift := uint(0); ; shift += 7 { 2910 if shift >= 64 { 2911 return ErrIntOverflowRpc 2912 } 2913 if iNdEx >= l { 2914 return io.ErrUnexpectedEOF 2915 } 2916 b := dAtA[iNdEx] 2917 iNdEx++ 2918 msglen |= int(b&0x7F) << shift 2919 if b < 0x80 { 2920 break 2921 } 2922 } 2923 if msglen < 0 { 2924 return ErrInvalidLengthRpc 2925 } 2926 postIndex := iNdEx + msglen 2927 if postIndex < 0 { 2928 return ErrInvalidLengthRpc 2929 } 2930 if postIndex > l { 2931 return io.ErrUnexpectedEOF 2932 } 2933 if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2934 return err 2935 } 2936 iNdEx = postIndex 2937 case 4: 2938 if wireType != 2 { 2939 return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType) 2940 } 2941 var stringLen uint64 2942 for shift := uint(0); ; shift += 7 { 2943 if shift >= 64 { 2944 return ErrIntOverflowRpc 2945 } 2946 if iNdEx >= l { 2947 return io.ErrUnexpectedEOF 2948 } 2949 b := dAtA[iNdEx] 2950 iNdEx++ 2951 stringLen |= uint64(b&0x7F) << shift 2952 if b < 0x80 { 2953 break 2954 } 2955 } 2956 intStringLen := int(stringLen) 2957 if intStringLen < 0 { 2958 return ErrInvalidLengthRpc 2959 } 2960 postIndex := iNdEx + intStringLen 2961 if postIndex < 0 { 2962 return ErrInvalidLengthRpc 2963 } 2964 if postIndex > l { 2965 return io.ErrUnexpectedEOF 2966 } 2967 m.Health = string(dAtA[iNdEx:postIndex]) 2968 iNdEx = postIndex 2969 case 5: 2970 if wireType != 2 { 2971 return fmt.Errorf("proto: wrong wireType = %d for field LastError", wireType) 2972 } 2973 var stringLen uint64 2974 for shift := uint(0); ; shift += 7 { 2975 if shift >= 64 { 2976 return ErrIntOverflowRpc 2977 } 2978 if iNdEx >= l { 2979 return io.ErrUnexpectedEOF 2980 } 2981 b := dAtA[iNdEx] 2982 iNdEx++ 2983 stringLen |= uint64(b&0x7F) << shift 2984 if b < 0x80 { 2985 break 2986 } 2987 } 2988 intStringLen := int(stringLen) 2989 if intStringLen < 0 { 2990 return ErrInvalidLengthRpc 2991 } 2992 postIndex := iNdEx + intStringLen 2993 if postIndex < 0 { 2994 return ErrInvalidLengthRpc 2995 } 2996 if postIndex > l { 2997 return io.ErrUnexpectedEOF 2998 } 2999 m.LastError = string(dAtA[iNdEx:postIndex]) 3000 iNdEx = postIndex 3001 case 6: 3002 if wireType != 1 { 3003 return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDurationSeconds", wireType) 3004 } 3005 var v uint64 3006 if (iNdEx + 8) > l { 3007 return io.ErrUnexpectedEOF 3008 } 3009 v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) 3010 iNdEx += 8 3011 m.EvaluationDurationSeconds = float64(math.Float64frombits(v)) 3012 case 7: 3013 if wireType != 2 { 3014 return fmt.Errorf("proto: wrong wireType = %d for field LastEvaluation", wireType) 3015 } 3016 var msglen int 3017 for shift := uint(0); ; shift += 7 { 3018 if shift >= 64 { 3019 return ErrIntOverflowRpc 3020 } 3021 if iNdEx >= l { 3022 return io.ErrUnexpectedEOF 3023 } 3024 b := dAtA[iNdEx] 3025 iNdEx++ 3026 msglen |= int(b&0x7F) << shift 3027 if b < 0x80 { 3028 break 3029 } 3030 } 3031 if msglen < 0 { 3032 return ErrInvalidLengthRpc 3033 } 3034 postIndex := iNdEx + msglen 3035 if postIndex < 0 { 3036 return ErrInvalidLengthRpc 3037 } 3038 if postIndex > l { 3039 return io.ErrUnexpectedEOF 3040 } 3041 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastEvaluation, dAtA[iNdEx:postIndex]); err != nil { 3042 return err 3043 } 3044 iNdEx = postIndex 3045 default: 3046 iNdEx = preIndex 3047 skippy, err := skipRpc(dAtA[iNdEx:]) 3048 if err != nil { 3049 return err 3050 } 3051 if (skippy < 0) || (iNdEx+skippy) < 0 { 3052 return ErrInvalidLengthRpc 3053 } 3054 if (iNdEx + skippy) > l { 3055 return io.ErrUnexpectedEOF 3056 } 3057 iNdEx += skippy 3058 } 3059 } 3060 3061 if iNdEx > l { 3062 return io.ErrUnexpectedEOF 3063 } 3064 return nil 3065 } 3066 func skipRpc(dAtA []byte) (n int, err error) { 3067 l := len(dAtA) 3068 iNdEx := 0 3069 depth := 0 3070 for iNdEx < l { 3071 var wire uint64 3072 for shift := uint(0); ; shift += 7 { 3073 if shift >= 64 { 3074 return 0, ErrIntOverflowRpc 3075 } 3076 if iNdEx >= l { 3077 return 0, io.ErrUnexpectedEOF 3078 } 3079 b := dAtA[iNdEx] 3080 iNdEx++ 3081 wire |= (uint64(b) & 0x7F) << shift 3082 if b < 0x80 { 3083 break 3084 } 3085 } 3086 wireType := int(wire & 0x7) 3087 switch wireType { 3088 case 0: 3089 for shift := uint(0); ; shift += 7 { 3090 if shift >= 64 { 3091 return 0, ErrIntOverflowRpc 3092 } 3093 if iNdEx >= l { 3094 return 0, io.ErrUnexpectedEOF 3095 } 3096 iNdEx++ 3097 if dAtA[iNdEx-1] < 0x80 { 3098 break 3099 } 3100 } 3101 case 1: 3102 iNdEx += 8 3103 case 2: 3104 var length int 3105 for shift := uint(0); ; shift += 7 { 3106 if shift >= 64 { 3107 return 0, ErrIntOverflowRpc 3108 } 3109 if iNdEx >= l { 3110 return 0, io.ErrUnexpectedEOF 3111 } 3112 b := dAtA[iNdEx] 3113 iNdEx++ 3114 length |= (int(b) & 0x7F) << shift 3115 if b < 0x80 { 3116 break 3117 } 3118 } 3119 if length < 0 { 3120 return 0, ErrInvalidLengthRpc 3121 } 3122 iNdEx += length 3123 case 3: 3124 depth++ 3125 case 4: 3126 if depth == 0 { 3127 return 0, ErrUnexpectedEndOfGroupRpc 3128 } 3129 depth-- 3130 case 5: 3131 iNdEx += 4 3132 default: 3133 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3134 } 3135 if iNdEx < 0 { 3136 return 0, ErrInvalidLengthRpc 3137 } 3138 if depth == 0 { 3139 return iNdEx, nil 3140 } 3141 } 3142 return 0, io.ErrUnexpectedEOF 3143 } 3144 3145 var ( 3146 ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") 3147 ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") 3148 ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group") 3149 )