mirror of https://github.com/grafana/loki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2655 lines
68 KiB
2655 lines
68 KiB
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: pkg/ruler/base/ruler.proto
|
|
|
|
package base
|
|
|
|
import (
|
|
context "context"
|
|
encoding_binary "encoding/binary"
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
_ "github.com/gogo/protobuf/types"
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
_ "github.com/grafana/loki/v3/pkg/logproto"
|
|
github_com_grafana_loki_v3_pkg_logproto "github.com/grafana/loki/v3/pkg/logproto"
|
|
rulespb "github.com/grafana/loki/v3/pkg/ruler/rulespb"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
_ "google.golang.org/protobuf/types/known/durationpb"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
reflect "reflect"
|
|
strconv "strconv"
|
|
strings "strings"
|
|
time "time"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type RulesRequest_RuleType int32
|
|
|
|
const (
|
|
AnyRule RulesRequest_RuleType = 0
|
|
AlertingRule RulesRequest_RuleType = 1
|
|
RecordingRule RulesRequest_RuleType = 2
|
|
)
|
|
|
|
var RulesRequest_RuleType_name = map[int32]string{
|
|
0: "AnyRule",
|
|
1: "AlertingRule",
|
|
2: "RecordingRule",
|
|
}
|
|
|
|
var RulesRequest_RuleType_value = map[string]int32{
|
|
"AnyRule": 0,
|
|
"AlertingRule": 1,
|
|
"RecordingRule": 2,
|
|
}
|
|
|
|
func (RulesRequest_RuleType) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_ca810a0fd7057a73, []int{0, 0}
|
|
}
|
|
|
|
type RulesRequest struct {
|
|
Filter RulesRequest_RuleType `protobuf:"varint,1,opt,name=filter,proto3,enum=base.RulesRequest_RuleType" json:"filter,omitempty"`
|
|
RuleName []string `protobuf:"bytes,2,rep,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
|
|
RuleGroup []string `protobuf:"bytes,3,rep,name=rule_group,json=ruleGroup,proto3" json:"rule_group,omitempty"`
|
|
File []string `protobuf:"bytes,4,rep,name=file,proto3" json:"file,omitempty"`
|
|
}
|
|
|
|
func (m *RulesRequest) Reset() { *m = RulesRequest{} }
|
|
func (*RulesRequest) ProtoMessage() {}
|
|
func (*RulesRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ca810a0fd7057a73, []int{0}
|
|
}
|
|
func (m *RulesRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RulesRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RulesRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RulesRequest.Merge(m, src)
|
|
}
|
|
func (m *RulesRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RulesRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RulesRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RulesRequest proto.InternalMessageInfo
|
|
|
|
func (m *RulesRequest) GetFilter() RulesRequest_RuleType {
|
|
if m != nil {
|
|
return m.Filter
|
|
}
|
|
return AnyRule
|
|
}
|
|
|
|
func (m *RulesRequest) GetRuleName() []string {
|
|
if m != nil {
|
|
return m.RuleName
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RulesRequest) GetRuleGroup() []string {
|
|
if m != nil {
|
|
return m.RuleGroup
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RulesRequest) GetFile() []string {
|
|
if m != nil {
|
|
return m.File
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type RulesResponse struct {
|
|
Groups []*GroupStateDesc `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
|
|
}
|
|
|
|
func (m *RulesResponse) Reset() { *m = RulesResponse{} }
|
|
func (*RulesResponse) ProtoMessage() {}
|
|
func (*RulesResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ca810a0fd7057a73, []int{1}
|
|
}
|
|
func (m *RulesResponse) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RulesResponse.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RulesResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RulesResponse.Merge(m, src)
|
|
}
|
|
func (m *RulesResponse) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RulesResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RulesResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RulesResponse proto.InternalMessageInfo
|
|
|
|
func (m *RulesResponse) GetGroups() []*GroupStateDesc {
|
|
if m != nil {
|
|
return m.Groups
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// GroupStateDesc is a proto representation of a rule group
|
|
type GroupStateDesc struct {
|
|
Group *rulespb.RuleGroupDesc `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
|
|
ActiveRules []*RuleStateDesc `protobuf:"bytes,2,rep,name=active_rules,json=activeRules,proto3" json:"active_rules,omitempty"`
|
|
EvaluationTimestamp time.Time `protobuf:"bytes,3,opt,name=evaluationTimestamp,proto3,stdtime" json:"evaluationTimestamp"`
|
|
EvaluationDuration time.Duration `protobuf:"bytes,4,opt,name=evaluationDuration,proto3,stdduration" json:"evaluationDuration"`
|
|
}
|
|
|
|
func (m *GroupStateDesc) Reset() { *m = GroupStateDesc{} }
|
|
func (*GroupStateDesc) ProtoMessage() {}
|
|
func (*GroupStateDesc) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ca810a0fd7057a73, []int{2}
|
|
}
|
|
func (m *GroupStateDesc) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *GroupStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_GroupStateDesc.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *GroupStateDesc) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_GroupStateDesc.Merge(m, src)
|
|
}
|
|
func (m *GroupStateDesc) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *GroupStateDesc) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_GroupStateDesc.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_GroupStateDesc proto.InternalMessageInfo
|
|
|
|
func (m *GroupStateDesc) GetGroup() *rulespb.RuleGroupDesc {
|
|
if m != nil {
|
|
return m.Group
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GroupStateDesc) GetActiveRules() []*RuleStateDesc {
|
|
if m != nil {
|
|
return m.ActiveRules
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GroupStateDesc) GetEvaluationTimestamp() time.Time {
|
|
if m != nil {
|
|
return m.EvaluationTimestamp
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *GroupStateDesc) GetEvaluationDuration() time.Duration {
|
|
if m != nil {
|
|
return m.EvaluationDuration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// RuleStateDesc is a proto representation of a Prometheus Rule
|
|
type RuleStateDesc struct {
|
|
Rule *rulespb.RuleDesc `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
|
|
State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
|
|
Health string `protobuf:"bytes,3,opt,name=health,proto3" json:"health,omitempty"`
|
|
LastError string `protobuf:"bytes,4,opt,name=lastError,proto3" json:"lastError,omitempty"`
|
|
Alerts []*AlertStateDesc `protobuf:"bytes,5,rep,name=alerts,proto3" json:"alerts,omitempty"`
|
|
EvaluationTimestamp time.Time `protobuf:"bytes,6,opt,name=evaluationTimestamp,proto3,stdtime" json:"evaluationTimestamp"`
|
|
EvaluationDuration time.Duration `protobuf:"bytes,7,opt,name=evaluationDuration,proto3,stdduration" json:"evaluationDuration"`
|
|
}
|
|
|
|
func (m *RuleStateDesc) Reset() { *m = RuleStateDesc{} }
|
|
func (*RuleStateDesc) ProtoMessage() {}
|
|
func (*RuleStateDesc) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ca810a0fd7057a73, []int{3}
|
|
}
|
|
func (m *RuleStateDesc) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *RuleStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_RuleStateDesc.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *RuleStateDesc) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RuleStateDesc.Merge(m, src)
|
|
}
|
|
func (m *RuleStateDesc) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *RuleStateDesc) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RuleStateDesc.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RuleStateDesc proto.InternalMessageInfo
|
|
|
|
func (m *RuleStateDesc) GetRule() *rulespb.RuleDesc {
|
|
if m != nil {
|
|
return m.Rule
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RuleStateDesc) GetState() string {
|
|
if m != nil {
|
|
return m.State
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RuleStateDesc) GetHealth() string {
|
|
if m != nil {
|
|
return m.Health
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RuleStateDesc) GetLastError() string {
|
|
if m != nil {
|
|
return m.LastError
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *RuleStateDesc) GetAlerts() []*AlertStateDesc {
|
|
if m != nil {
|
|
return m.Alerts
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *RuleStateDesc) GetEvaluationTimestamp() time.Time {
|
|
if m != nil {
|
|
return m.EvaluationTimestamp
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *RuleStateDesc) GetEvaluationDuration() time.Duration {
|
|
if m != nil {
|
|
return m.EvaluationDuration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type AlertStateDesc struct {
|
|
State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
|
|
Labels []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,2,rep,name=labels,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"labels"`
|
|
Annotations []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,3,rep,name=annotations,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"annotations"`
|
|
Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"`
|
|
ActiveAt time.Time `protobuf:"bytes,5,opt,name=active_at,json=activeAt,proto3,stdtime" json:"active_at"`
|
|
FiredAt time.Time `protobuf:"bytes,6,opt,name=fired_at,json=firedAt,proto3,stdtime" json:"fired_at"`
|
|
ResolvedAt time.Time `protobuf:"bytes,7,opt,name=resolved_at,json=resolvedAt,proto3,stdtime" json:"resolved_at"`
|
|
LastSentAt time.Time `protobuf:"bytes,8,opt,name=last_sent_at,json=lastSentAt,proto3,stdtime" json:"last_sent_at"`
|
|
ValidUntil time.Time `protobuf:"bytes,9,opt,name=valid_until,json=validUntil,proto3,stdtime" json:"valid_until"`
|
|
}
|
|
|
|
func (m *AlertStateDesc) Reset() { *m = AlertStateDesc{} }
|
|
func (*AlertStateDesc) ProtoMessage() {}
|
|
func (*AlertStateDesc) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ca810a0fd7057a73, []int{4}
|
|
}
|
|
func (m *AlertStateDesc) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *AlertStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_AlertStateDesc.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *AlertStateDesc) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AlertStateDesc.Merge(m, src)
|
|
}
|
|
func (m *AlertStateDesc) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *AlertStateDesc) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AlertStateDesc.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AlertStateDesc proto.InternalMessageInfo
|
|
|
|
func (m *AlertStateDesc) GetState() string {
|
|
if m != nil {
|
|
return m.State
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *AlertStateDesc) GetValue() float64 {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *AlertStateDesc) GetActiveAt() time.Time {
|
|
if m != nil {
|
|
return m.ActiveAt
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *AlertStateDesc) GetFiredAt() time.Time {
|
|
if m != nil {
|
|
return m.FiredAt
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *AlertStateDesc) GetResolvedAt() time.Time {
|
|
if m != nil {
|
|
return m.ResolvedAt
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *AlertStateDesc) GetLastSentAt() time.Time {
|
|
if m != nil {
|
|
return m.LastSentAt
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func (m *AlertStateDesc) GetValidUntil() time.Time {
|
|
if m != nil {
|
|
return m.ValidUntil
|
|
}
|
|
return time.Time{}
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("base.RulesRequest_RuleType", RulesRequest_RuleType_name, RulesRequest_RuleType_value)
|
|
proto.RegisterType((*RulesRequest)(nil), "base.RulesRequest")
|
|
proto.RegisterType((*RulesResponse)(nil), "base.RulesResponse")
|
|
proto.RegisterType((*GroupStateDesc)(nil), "base.GroupStateDesc")
|
|
proto.RegisterType((*RuleStateDesc)(nil), "base.RuleStateDesc")
|
|
proto.RegisterType((*AlertStateDesc)(nil), "base.AlertStateDesc")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("pkg/ruler/base/ruler.proto", fileDescriptor_ca810a0fd7057a73) }
|
|
|
|
var fileDescriptor_ca810a0fd7057a73 = []byte{
|
|
// 790 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x4e, 0xdb, 0x4c,
|
|
0x14, 0xf5, 0xe4, 0xdf, 0x93, 0xc0, 0xc7, 0x37, 0xa0, 0xca, 0x84, 0xe2, 0x44, 0xe9, 0x26, 0xaa,
|
|
0x2a, 0x5b, 0x0a, 0xa8, 0x9b, 0x52, 0x55, 0x41, 0xd0, 0x6e, 0x50, 0x55, 0x19, 0xda, 0x6d, 0x34,
|
|
0x49, 0x26, 0xc6, 0xc2, 0xf1, 0xb8, 0xe3, 0x71, 0xa4, 0xec, 0xaa, 0x3e, 0x01, 0xcb, 0x6e, 0xbb,
|
|
0xeb, 0xa3, 0xb0, 0xa4, 0x3b, 0xd4, 0x4a, 0xb4, 0x84, 0x4d, 0x97, 0x3c, 0x42, 0x35, 0x33, 0x36,
|
|
0x09, 0x85, 0x2e, 0xa2, 0x8a, 0x0d, 0xcc, 0xfd, 0x39, 0xe7, 0xde, 0x39, 0xf7, 0x8e, 0x03, 0xab,
|
|
0xe1, 0x91, 0x6b, 0xb3, 0xd8, 0x27, 0xcc, 0xee, 0xe2, 0x88, 0xa8, 0xa3, 0x15, 0x32, 0xca, 0x29,
|
|
0xca, 0x09, 0x4f, 0x75, 0xc5, 0xa5, 0x2e, 0x95, 0x0e, 0x5b, 0x9c, 0x54, 0xac, 0x6a, 0xba, 0x94,
|
|
0xba, 0x3e, 0xb1, 0xa5, 0xd5, 0x8d, 0x07, 0x76, 0x3f, 0x66, 0x98, 0x7b, 0x34, 0x48, 0xe2, 0xb5,
|
|
0x3f, 0xe3, 0xdc, 0x1b, 0x92, 0x88, 0xe3, 0x61, 0x98, 0x24, 0xac, 0x89, 0xc2, 0x3e, 0x75, 0x15,
|
|
0x73, 0x7a, 0x48, 0x82, 0xeb, 0xd3, 0xae, 0xc4, 0xdf, 0x28, 0xec, 0xaa, 0xff, 0x2a, 0xdc, 0xf8,
|
|
0x0a, 0x60, 0xc5, 0x11, 0xb6, 0x43, 0xde, 0xc7, 0x24, 0xe2, 0x68, 0x03, 0x16, 0x06, 0x9e, 0xcf,
|
|
0x09, 0x33, 0x40, 0x1d, 0x34, 0x17, 0x5b, 0x6b, 0x96, 0x68, 0xdd, 0x9a, 0xcd, 0x91, 0xc6, 0xc1,
|
|
0x38, 0x24, 0x4e, 0x92, 0x8a, 0xd6, 0xa0, 0x2e, 0x48, 0x3b, 0x01, 0x1e, 0x12, 0x23, 0x53, 0xcf,
|
|
0x36, 0x75, 0xa7, 0x24, 0x1c, 0xaf, 0xf1, 0x90, 0xa0, 0x75, 0x08, 0x65, 0xd0, 0x65, 0x34, 0x0e,
|
|
0x8d, 0xac, 0x8c, 0xca, 0xf4, 0x57, 0xc2, 0x81, 0x10, 0xcc, 0x0d, 0x3c, 0x9f, 0x18, 0x39, 0x19,
|
|
0x90, 0xe7, 0xc6, 0x16, 0x2c, 0xa5, 0x35, 0x50, 0x19, 0x16, 0xdb, 0xc1, 0x58, 0x98, 0x4b, 0x1a,
|
|
0x5a, 0x82, 0x95, 0xb6, 0x4f, 0x18, 0xf7, 0x02, 0x57, 0x7a, 0x00, 0xfa, 0x1f, 0x2e, 0x38, 0xa4,
|
|
0x47, 0x59, 0x3f, 0x75, 0x65, 0x1a, 0xcf, 0xe1, 0x42, 0xd2, 0x6e, 0x14, 0xd2, 0x20, 0x22, 0xe8,
|
|
0x09, 0x2c, 0xc8, 0xe2, 0x91, 0x01, 0xea, 0xd9, 0x66, 0xb9, 0xb5, 0xa2, 0xee, 0x24, 0xeb, 0xef,
|
|
0x73, 0xcc, 0xc9, 0x0e, 0x89, 0x7a, 0x4e, 0x92, 0xd3, 0xf8, 0x9c, 0x81, 0x8b, 0x37, 0x43, 0xe8,
|
|
0x31, 0xcc, 0xab, 0xee, 0x85, 0x26, 0x02, 0xaf, 0x24, 0x74, 0xd2, 0x4b, 0x48, 0xbc, 0x4a, 0x41,
|
|
0x4f, 0x61, 0x05, 0xf7, 0xb8, 0x37, 0x22, 0x1d, 0x99, 0x24, 0xe5, 0x28, 0xb7, 0x96, 0xa7, 0x32,
|
|
0x4e, 0x2b, 0x96, 0x55, 0xa2, 0x6c, 0x16, 0xbd, 0x83, 0xcb, 0x64, 0x84, 0xfd, 0x58, 0x8e, 0xfe,
|
|
0x20, 0x1d, 0xb1, 0x91, 0x95, 0x15, 0xab, 0x96, 0x5a, 0x02, 0x2b, 0x5d, 0x02, 0xeb, 0x3a, 0x63,
|
|
0xbb, 0x74, 0x72, 0x5e, 0xd3, 0x8e, 0x7f, 0xd4, 0x80, 0x73, 0x17, 0x01, 0xda, 0x87, 0x68, 0xea,
|
|
0xde, 0x49, 0x56, 0xcb, 0xc8, 0x49, 0xda, 0xd5, 0x5b, 0xb4, 0x69, 0x82, 0x62, 0xfd, 0x24, 0x58,
|
|
0xef, 0x80, 0x37, 0xbe, 0x67, 0x94, 0xc6, 0x53, 0x89, 0x1e, 0xc1, 0x9c, 0xb8, 0x6f, 0xa2, 0xd0,
|
|
0x7f, 0x33, 0x0a, 0xc9, 0xab, 0xca, 0x20, 0x5a, 0x81, 0xf9, 0x48, 0x20, 0x8c, 0x4c, 0x1d, 0x34,
|
|
0x75, 0x47, 0x19, 0xe8, 0x01, 0x2c, 0x1c, 0x12, 0xec, 0xf3, 0x43, 0x79, 0x59, 0xdd, 0x49, 0x2c,
|
|
0xf4, 0x10, 0xea, 0x3e, 0x8e, 0xf8, 0x2e, 0x63, 0x94, 0xc9, 0x86, 0x75, 0x67, 0xea, 0x10, 0x43,
|
|
0xc5, 0x62, 0x15, 0x22, 0x23, 0x3f, 0x3b, 0x54, 0xb9, 0x1e, 0x33, 0x43, 0x55, 0x39, 0x7f, 0x53,
|
|
0xb7, 0x70, 0x3f, 0xea, 0x16, 0xff, 0x4d, 0xdd, 0x8f, 0x79, 0xb8, 0x78, 0xf3, 0x1e, 0x53, 0xe5,
|
|
0xc0, 0xac, 0x72, 0x14, 0x16, 0x7c, 0xdc, 0x25, 0x7e, 0xba, 0x65, 0xab, 0xd6, 0xf5, 0xeb, 0xdf,
|
|
0x23, 0x2e, 0xee, 0x8d, 0xf7, 0x44, 0xf4, 0x0d, 0xf6, 0xd8, 0xf6, 0x96, 0xa8, 0xf8, 0xed, 0xbc,
|
|
0xb6, 0xe9, 0x7a, 0xfc, 0x30, 0xee, 0x5a, 0x3d, 0x3a, 0xb4, 0x5d, 0x86, 0x07, 0x38, 0xc0, 0xb6,
|
|
0x4f, 0x8f, 0x3c, 0x7b, 0xb4, 0x61, 0xcf, 0x7e, 0x47, 0x2c, 0x09, 0x6d, 0xf7, 0x71, 0xc8, 0x09,
|
|
0x73, 0x92, 0x32, 0x68, 0x0c, 0xcb, 0x38, 0x08, 0x28, 0x97, 0x7d, 0x46, 0xf2, 0x31, 0xdf, 0x63,
|
|
0xd5, 0xd9, 0x5a, 0x42, 0x01, 0xa1, 0x14, 0x91, 0x9b, 0x00, 0x1c, 0x65, 0xa0, 0x36, 0xd4, 0x93,
|
|
0xd7, 0x86, 0xb9, 0x91, 0x9f, 0x63, 0x9a, 0x25, 0x05, 0x6b, 0x73, 0xf4, 0x02, 0x96, 0x06, 0x1e,
|
|
0x23, 0x7d, 0xc1, 0x30, 0xcf, 0x3e, 0x14, 0x25, 0xaa, 0xcd, 0xd1, 0x2e, 0x2c, 0x33, 0x12, 0x51,
|
|
0x7f, 0xa4, 0x38, 0x8a, 0x73, 0x70, 0xc0, 0x14, 0xd8, 0xe6, 0xe8, 0x25, 0xac, 0x88, 0xed, 0xee,
|
|
0x44, 0x24, 0xe0, 0x82, 0xa7, 0x34, 0x0f, 0x8f, 0x40, 0xee, 0x93, 0x80, 0xab, 0x76, 0x46, 0xd8,
|
|
0xf7, 0xfa, 0x9d, 0x38, 0xe0, 0x9e, 0x6f, 0xe8, 0xf3, 0xd0, 0x48, 0xe0, 0x5b, 0x81, 0x6b, 0x3d,
|
|
0x83, 0x79, 0xf1, 0x7a, 0x19, 0x6a, 0xa9, 0x43, 0x84, 0xd0, 0xed, 0x9f, 0x82, 0xea, 0xf2, 0x0d,
|
|
0x9f, 0xfa, 0xde, 0x36, 0xb4, 0xed, 0xcd, 0xd3, 0x0b, 0x53, 0x3b, 0xbb, 0x30, 0xb5, 0xab, 0x0b,
|
|
0x13, 0x7c, 0x98, 0x98, 0xe0, 0xcb, 0xc4, 0x04, 0x27, 0x13, 0x13, 0x9c, 0x4e, 0x4c, 0xf0, 0x73,
|
|
0x62, 0x82, 0x5f, 0x13, 0x53, 0xbb, 0x9a, 0x98, 0xe0, 0xf8, 0xd2, 0xd4, 0x4e, 0x2f, 0x4d, 0xed,
|
|
0xec, 0xd2, 0xd4, 0xba, 0x05, 0xd9, 0xdc, 0xc6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x34,
|
|
0xd7, 0x09, 0x4a, 0x07, 0x00, 0x00,
|
|
}
|
|
|
|
func (x RulesRequest_RuleType) String() string {
|
|
s, ok := RulesRequest_RuleType_name[int32(x)]
|
|
if ok {
|
|
return s
|
|
}
|
|
return strconv.Itoa(int(x))
|
|
}
|
|
func (this *RulesRequest) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*RulesRequest)
|
|
if !ok {
|
|
that2, ok := that.(RulesRequest)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.Filter != that1.Filter {
|
|
return false
|
|
}
|
|
if len(this.RuleName) != len(that1.RuleName) {
|
|
return false
|
|
}
|
|
for i := range this.RuleName {
|
|
if this.RuleName[i] != that1.RuleName[i] {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.RuleGroup) != len(that1.RuleGroup) {
|
|
return false
|
|
}
|
|
for i := range this.RuleGroup {
|
|
if this.RuleGroup[i] != that1.RuleGroup[i] {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.File) != len(that1.File) {
|
|
return false
|
|
}
|
|
for i := range this.File {
|
|
if this.File[i] != that1.File[i] {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *RulesResponse) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*RulesResponse)
|
|
if !ok {
|
|
that2, ok := that.(RulesResponse)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.Groups) != len(that1.Groups) {
|
|
return false
|
|
}
|
|
for i := range this.Groups {
|
|
if !this.Groups[i].Equal(that1.Groups[i]) {
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
}
|
|
func (this *GroupStateDesc) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*GroupStateDesc)
|
|
if !ok {
|
|
that2, ok := that.(GroupStateDesc)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Group.Equal(that1.Group) {
|
|
return false
|
|
}
|
|
if len(this.ActiveRules) != len(that1.ActiveRules) {
|
|
return false
|
|
}
|
|
for i := range this.ActiveRules {
|
|
if !this.ActiveRules[i].Equal(that1.ActiveRules[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if !this.EvaluationTimestamp.Equal(that1.EvaluationTimestamp) {
|
|
return false
|
|
}
|
|
if this.EvaluationDuration != that1.EvaluationDuration {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *RuleStateDesc) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*RuleStateDesc)
|
|
if !ok {
|
|
that2, ok := that.(RuleStateDesc)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.Rule.Equal(that1.Rule) {
|
|
return false
|
|
}
|
|
if this.State != that1.State {
|
|
return false
|
|
}
|
|
if this.Health != that1.Health {
|
|
return false
|
|
}
|
|
if this.LastError != that1.LastError {
|
|
return false
|
|
}
|
|
if len(this.Alerts) != len(that1.Alerts) {
|
|
return false
|
|
}
|
|
for i := range this.Alerts {
|
|
if !this.Alerts[i].Equal(that1.Alerts[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if !this.EvaluationTimestamp.Equal(that1.EvaluationTimestamp) {
|
|
return false
|
|
}
|
|
if this.EvaluationDuration != that1.EvaluationDuration {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *AlertStateDesc) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*AlertStateDesc)
|
|
if !ok {
|
|
that2, ok := that.(AlertStateDesc)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.State != that1.State {
|
|
return false
|
|
}
|
|
if len(this.Labels) != len(that1.Labels) {
|
|
return false
|
|
}
|
|
for i := range this.Labels {
|
|
if !this.Labels[i].Equal(that1.Labels[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if len(this.Annotations) != len(that1.Annotations) {
|
|
return false
|
|
}
|
|
for i := range this.Annotations {
|
|
if !this.Annotations[i].Equal(that1.Annotations[i]) {
|
|
return false
|
|
}
|
|
}
|
|
if this.Value != that1.Value {
|
|
return false
|
|
}
|
|
if !this.ActiveAt.Equal(that1.ActiveAt) {
|
|
return false
|
|
}
|
|
if !this.FiredAt.Equal(that1.FiredAt) {
|
|
return false
|
|
}
|
|
if !this.ResolvedAt.Equal(that1.ResolvedAt) {
|
|
return false
|
|
}
|
|
if !this.LastSentAt.Equal(that1.LastSentAt) {
|
|
return false
|
|
}
|
|
if !this.ValidUntil.Equal(that1.ValidUntil) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *RulesRequest) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&base.RulesRequest{")
|
|
s = append(s, "Filter: "+fmt.Sprintf("%#v", this.Filter)+",\n")
|
|
s = append(s, "RuleName: "+fmt.Sprintf("%#v", this.RuleName)+",\n")
|
|
s = append(s, "RuleGroup: "+fmt.Sprintf("%#v", this.RuleGroup)+",\n")
|
|
s = append(s, "File: "+fmt.Sprintf("%#v", this.File)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RulesResponse) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 5)
|
|
s = append(s, "&base.RulesResponse{")
|
|
if this.Groups != nil {
|
|
s = append(s, "Groups: "+fmt.Sprintf("%#v", this.Groups)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *GroupStateDesc) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 8)
|
|
s = append(s, "&base.GroupStateDesc{")
|
|
if this.Group != nil {
|
|
s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n")
|
|
}
|
|
if this.ActiveRules != nil {
|
|
s = append(s, "ActiveRules: "+fmt.Sprintf("%#v", this.ActiveRules)+",\n")
|
|
}
|
|
s = append(s, "EvaluationTimestamp: "+fmt.Sprintf("%#v", this.EvaluationTimestamp)+",\n")
|
|
s = append(s, "EvaluationDuration: "+fmt.Sprintf("%#v", this.EvaluationDuration)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *RuleStateDesc) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 11)
|
|
s = append(s, "&base.RuleStateDesc{")
|
|
if this.Rule != nil {
|
|
s = append(s, "Rule: "+fmt.Sprintf("%#v", this.Rule)+",\n")
|
|
}
|
|
s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
|
|
s = append(s, "Health: "+fmt.Sprintf("%#v", this.Health)+",\n")
|
|
s = append(s, "LastError: "+fmt.Sprintf("%#v", this.LastError)+",\n")
|
|
if this.Alerts != nil {
|
|
s = append(s, "Alerts: "+fmt.Sprintf("%#v", this.Alerts)+",\n")
|
|
}
|
|
s = append(s, "EvaluationTimestamp: "+fmt.Sprintf("%#v", this.EvaluationTimestamp)+",\n")
|
|
s = append(s, "EvaluationDuration: "+fmt.Sprintf("%#v", this.EvaluationDuration)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *AlertStateDesc) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 13)
|
|
s = append(s, "&base.AlertStateDesc{")
|
|
s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
|
|
s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n")
|
|
s = append(s, "Annotations: "+fmt.Sprintf("%#v", this.Annotations)+",\n")
|
|
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
|
|
s = append(s, "ActiveAt: "+fmt.Sprintf("%#v", this.ActiveAt)+",\n")
|
|
s = append(s, "FiredAt: "+fmt.Sprintf("%#v", this.FiredAt)+",\n")
|
|
s = append(s, "ResolvedAt: "+fmt.Sprintf("%#v", this.ResolvedAt)+",\n")
|
|
s = append(s, "LastSentAt: "+fmt.Sprintf("%#v", this.LastSentAt)+",\n")
|
|
s = append(s, "ValidUntil: "+fmt.Sprintf("%#v", this.ValidUntil)+",\n")
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func valueToGoStringRuler(v interface{}, typ string) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// RulerClient is the client API for Ruler service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type RulerClient interface {
|
|
Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error)
|
|
}
|
|
|
|
type rulerClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewRulerClient(cc *grpc.ClientConn) RulerClient {
|
|
return &rulerClient{cc}
|
|
}
|
|
|
|
func (c *rulerClient) Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error) {
|
|
out := new(RulesResponse)
|
|
err := c.cc.Invoke(ctx, "/base.Ruler/Rules", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// RulerServer is the server API for Ruler service.
|
|
type RulerServer interface {
|
|
Rules(context.Context, *RulesRequest) (*RulesResponse, error)
|
|
}
|
|
|
|
// UnimplementedRulerServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedRulerServer struct {
|
|
}
|
|
|
|
func (*UnimplementedRulerServer) Rules(ctx context.Context, req *RulesRequest) (*RulesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Rules not implemented")
|
|
}
|
|
|
|
func RegisterRulerServer(s *grpc.Server, srv RulerServer) {
|
|
s.RegisterService(&_Ruler_serviceDesc, srv)
|
|
}
|
|
|
|
func _Ruler_Rules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RulesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(RulerServer).Rules(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/base.Ruler/Rules",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(RulerServer).Rules(ctx, req.(*RulesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Ruler_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "base.Ruler",
|
|
HandlerType: (*RulerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Rules",
|
|
Handler: _Ruler_Rules_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "pkg/ruler/base/ruler.proto",
|
|
}
|
|
|
|
func (m *RulesRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RulesRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.File) > 0 {
|
|
for iNdEx := len(m.File) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.File[iNdEx])
|
|
copy(dAtA[i:], m.File[iNdEx])
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.File[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
}
|
|
if len(m.RuleGroup) > 0 {
|
|
for iNdEx := len(m.RuleGroup) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.RuleGroup[iNdEx])
|
|
copy(dAtA[i:], m.RuleGroup[iNdEx])
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.RuleGroup[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if len(m.RuleName) > 0 {
|
|
for iNdEx := len(m.RuleName) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(m.RuleName[iNdEx])
|
|
copy(dAtA[i:], m.RuleName[iNdEx])
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.RuleName[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Filter != 0 {
|
|
i = encodeVarintRuler(dAtA, i, uint64(m.Filter))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *RulesResponse) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RulesResponse) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Groups) > 0 {
|
|
for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *GroupStateDesc) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *GroupStateDesc) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *GroupStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EvaluationDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration):])
|
|
if err1 != nil {
|
|
return 0, err1
|
|
}
|
|
i -= n1
|
|
i = encodeVarintRuler(dAtA, i, uint64(n1))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvaluationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp):])
|
|
if err2 != nil {
|
|
return 0, err2
|
|
}
|
|
i -= n2
|
|
i = encodeVarintRuler(dAtA, i, uint64(n2))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
if len(m.ActiveRules) > 0 {
|
|
for iNdEx := len(m.ActiveRules) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.ActiveRules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if m.Group != nil {
|
|
{
|
|
size, err := m.Group.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *RuleStateDesc) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *RuleStateDesc) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *RuleStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EvaluationDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration):])
|
|
if err4 != nil {
|
|
return 0, err4
|
|
}
|
|
i -= n4
|
|
i = encodeVarintRuler(dAtA, i, uint64(n4))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvaluationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp):])
|
|
if err5 != nil {
|
|
return 0, err5
|
|
}
|
|
i -= n5
|
|
i = encodeVarintRuler(dAtA, i, uint64(n5))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
if len(m.Alerts) > 0 {
|
|
for iNdEx := len(m.Alerts) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Alerts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
}
|
|
if len(m.LastError) > 0 {
|
|
i -= len(m.LastError)
|
|
copy(dAtA[i:], m.LastError)
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.LastError)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if len(m.Health) > 0 {
|
|
i -= len(m.Health)
|
|
copy(dAtA[i:], m.Health)
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.Health)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.State) > 0 {
|
|
i -= len(m.State)
|
|
copy(dAtA[i:], m.State)
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.State)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Rule != nil {
|
|
{
|
|
size, err := m.Rule.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *AlertStateDesc) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *AlertStateDesc) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *AlertStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ValidUntil, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil):])
|
|
if err7 != nil {
|
|
return 0, err7
|
|
}
|
|
i -= n7
|
|
i = encodeVarintRuler(dAtA, i, uint64(n7))
|
|
i--
|
|
dAtA[i] = 0x4a
|
|
n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastSentAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt):])
|
|
if err8 != nil {
|
|
return 0, err8
|
|
}
|
|
i -= n8
|
|
i = encodeVarintRuler(dAtA, i, uint64(n8))
|
|
i--
|
|
dAtA[i] = 0x42
|
|
n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ResolvedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt):])
|
|
if err9 != nil {
|
|
return 0, err9
|
|
}
|
|
i -= n9
|
|
i = encodeVarintRuler(dAtA, i, uint64(n9))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.FiredAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt):])
|
|
if err10 != nil {
|
|
return 0, err10
|
|
}
|
|
i -= n10
|
|
i = encodeVarintRuler(dAtA, i, uint64(n10))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ActiveAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt):])
|
|
if err11 != nil {
|
|
return 0, err11
|
|
}
|
|
i -= n11
|
|
i = encodeVarintRuler(dAtA, i, uint64(n11))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
if m.Value != 0 {
|
|
i -= 8
|
|
encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
|
|
i--
|
|
dAtA[i] = 0x21
|
|
}
|
|
if len(m.Annotations) > 0 {
|
|
for iNdEx := len(m.Annotations) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size := m.Annotations[iNdEx].Size()
|
|
i -= size
|
|
if _, err := m.Annotations[iNdEx].MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size := m.Labels[iNdEx].Size()
|
|
i -= size
|
|
if _, err := m.Labels[iNdEx].MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
i = encodeVarintRuler(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
}
|
|
if len(m.State) > 0 {
|
|
i -= len(m.State)
|
|
copy(dAtA[i:], m.State)
|
|
i = encodeVarintRuler(dAtA, i, uint64(len(m.State)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintRuler(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovRuler(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *RulesRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Filter != 0 {
|
|
n += 1 + sovRuler(uint64(m.Filter))
|
|
}
|
|
if len(m.RuleName) > 0 {
|
|
for _, s := range m.RuleName {
|
|
l = len(s)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
if len(m.RuleGroup) > 0 {
|
|
for _, s := range m.RuleGroup {
|
|
l = len(s)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
if len(m.File) > 0 {
|
|
for _, s := range m.File {
|
|
l = len(s)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *RulesResponse) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Groups) > 0 {
|
|
for _, e := range m.Groups {
|
|
l = e.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GroupStateDesc) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Group != nil {
|
|
l = m.Group.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
if len(m.ActiveRules) > 0 {
|
|
for _, e := range m.ActiveRules {
|
|
l = e.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func (m *RuleStateDesc) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Rule != nil {
|
|
l = m.Rule.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
l = len(m.State)
|
|
if l > 0 {
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
l = len(m.Health)
|
|
if l > 0 {
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
l = len(m.LastError)
|
|
if l > 0 {
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
if len(m.Alerts) > 0 {
|
|
for _, e := range m.Alerts {
|
|
l = e.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func (m *AlertStateDesc) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.State)
|
|
if l > 0 {
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
if len(m.Labels) > 0 {
|
|
for _, e := range m.Labels {
|
|
l = e.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
if len(m.Annotations) > 0 {
|
|
for _, e := range m.Annotations {
|
|
l = e.Size()
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
}
|
|
}
|
|
if m.Value != 0 {
|
|
n += 9
|
|
}
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil)
|
|
n += 1 + l + sovRuler(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func sovRuler(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozRuler(x uint64) (n int) {
|
|
return sovRuler(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (this *RulesRequest) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&RulesRequest{`,
|
|
`Filter:` + fmt.Sprintf("%v", this.Filter) + `,`,
|
|
`RuleName:` + fmt.Sprintf("%v", this.RuleName) + `,`,
|
|
`RuleGroup:` + fmt.Sprintf("%v", this.RuleGroup) + `,`,
|
|
`File:` + fmt.Sprintf("%v", this.File) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RulesResponse) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForGroups := "[]*GroupStateDesc{"
|
|
for _, f := range this.Groups {
|
|
repeatedStringForGroups += strings.Replace(f.String(), "GroupStateDesc", "GroupStateDesc", 1) + ","
|
|
}
|
|
repeatedStringForGroups += "}"
|
|
s := strings.Join([]string{`&RulesResponse{`,
|
|
`Groups:` + repeatedStringForGroups + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *GroupStateDesc) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForActiveRules := "[]*RuleStateDesc{"
|
|
for _, f := range this.ActiveRules {
|
|
repeatedStringForActiveRules += strings.Replace(f.String(), "RuleStateDesc", "RuleStateDesc", 1) + ","
|
|
}
|
|
repeatedStringForActiveRules += "}"
|
|
s := strings.Join([]string{`&GroupStateDesc{`,
|
|
`Group:` + strings.Replace(fmt.Sprintf("%v", this.Group), "RuleGroupDesc", "rulespb.RuleGroupDesc", 1) + `,`,
|
|
`ActiveRules:` + repeatedStringForActiveRules + `,`,
|
|
`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "durationpb.Duration", 1), `&`, ``, 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *RuleStateDesc) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
repeatedStringForAlerts := "[]*AlertStateDesc{"
|
|
for _, f := range this.Alerts {
|
|
repeatedStringForAlerts += strings.Replace(f.String(), "AlertStateDesc", "AlertStateDesc", 1) + ","
|
|
}
|
|
repeatedStringForAlerts += "}"
|
|
s := strings.Join([]string{`&RuleStateDesc{`,
|
|
`Rule:` + strings.Replace(fmt.Sprintf("%v", this.Rule), "RuleDesc", "rulespb.RuleDesc", 1) + `,`,
|
|
`State:` + fmt.Sprintf("%v", this.State) + `,`,
|
|
`Health:` + fmt.Sprintf("%v", this.Health) + `,`,
|
|
`LastError:` + fmt.Sprintf("%v", this.LastError) + `,`,
|
|
`Alerts:` + repeatedStringForAlerts + `,`,
|
|
`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "durationpb.Duration", 1), `&`, ``, 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *AlertStateDesc) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&AlertStateDesc{`,
|
|
`State:` + fmt.Sprintf("%v", this.State) + `,`,
|
|
`Labels:` + fmt.Sprintf("%v", this.Labels) + `,`,
|
|
`Annotations:` + fmt.Sprintf("%v", this.Annotations) + `,`,
|
|
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
|
|
`ActiveAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ActiveAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`FiredAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FiredAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`ResolvedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResolvedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`LastSentAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastSentAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`ValidUntil:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ValidUntil), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func valueToStringRuler(v interface{}) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("*%v", pv)
|
|
}
|
|
func (m *RulesRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RulesRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RulesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
|
|
}
|
|
m.Filter = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Filter |= RulesRequest_RuleType(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RuleName", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.RuleName = append(m.RuleName, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field RuleGroup", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.RuleGroup = append(m.RuleGroup, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field File", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.File = append(m.File, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRuler(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RulesResponse) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RulesResponse: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RulesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Groups = append(m.Groups, &GroupStateDesc{})
|
|
if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRuler(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GroupStateDesc) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: GroupStateDesc: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GroupStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Group == nil {
|
|
m.Group = &rulespb.RuleGroupDesc{}
|
|
}
|
|
if err := m.Group.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ActiveRules", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.ActiveRules = append(m.ActiveRules, &RuleStateDesc{})
|
|
if err := m.ActiveRules[len(m.ActiveRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EvaluationTimestamp", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvaluationTimestamp, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDuration", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EvaluationDuration, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRuler(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *RuleStateDesc) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: RuleStateDesc: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: RuleStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.Rule == nil {
|
|
m.Rule = &rulespb.RuleDesc{}
|
|
}
|
|
if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.State = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Health = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LastError", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.LastError = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Alerts", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Alerts = append(m.Alerts, &AlertStateDesc{})
|
|
if err := m.Alerts[len(m.Alerts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EvaluationTimestamp", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvaluationTimestamp, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDuration", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EvaluationDuration, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRuler(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *AlertStateDesc) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: AlertStateDesc: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: AlertStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.State = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Labels = append(m.Labels, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{})
|
|
if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Annotations = append(m.Annotations, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{})
|
|
if err := m.Annotations[len(m.Annotations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 1 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
|
}
|
|
var v uint64
|
|
if (iNdEx + 8) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
|
|
iNdEx += 8
|
|
m.Value = float64(math.Float64frombits(v))
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ActiveAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ActiveAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field FiredAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.FiredAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ResolvedAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ResolvedAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 8:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field LastSentAt", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastSentAt, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
case 9:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ValidUntil, dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipRuler(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthRuler
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipRuler(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthRuler
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthRuler
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowRuler
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipRuler(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthRuler
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthRuler = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowRuler = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|