Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRulesServer(s *grpc.Server, srv RulesServer)
- type Alert
- func (a1 *Alert) Compare(a2 *Alert) int
- func (*Alert) Descriptor() ([]byte, []int)
- func (m *Alert) Marshal() (dAtA []byte, err error)
- func (m *Alert) MarshalTo(dAtA []byte) (int, error)
- func (m *Alert) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Alert) ProtoMessage()
- func (m *Alert) Reset()
- func (m *Alert) Size() (n int)
- func (m *Alert) String() string
- func (m *Alert) Unmarshal(dAtA []byte) error
- func (m *Alert) XXX_DiscardUnknown()
- func (m *Alert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Alert) XXX_Merge(src proto.Message)
- func (m *Alert) XXX_Size() int
- func (m *Alert) XXX_Unmarshal(b []byte) error
- type AlertInstance
- func (*AlertInstance) Descriptor() ([]byte, []int)
- func (m *AlertInstance) Marshal() (dAtA []byte, err error)
- func (m *AlertInstance) MarshalTo(dAtA []byte) (int, error)
- func (m *AlertInstance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AlertInstance) ProtoMessage()
- func (m *AlertInstance) Reset()
- func (m *AlertInstance) Size() (n int)
- func (m *AlertInstance) String() string
- func (m *AlertInstance) Unmarshal(dAtA []byte) error
- func (m *AlertInstance) XXX_DiscardUnknown()
- func (m *AlertInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AlertInstance) XXX_Merge(src proto.Message)
- func (m *AlertInstance) XXX_Size() int
- func (m *AlertInstance) XXX_Unmarshal(b []byte) error
- type AlertState
- type RecordingRule
- func (r1 *RecordingRule) Compare(r2 *RecordingRule) int
- func (*RecordingRule) Descriptor() ([]byte, []int)
- func (m *RecordingRule) Marshal() (dAtA []byte, err error)
- func (m *RecordingRule) MarshalTo(dAtA []byte) (int, error)
- func (m *RecordingRule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RecordingRule) ProtoMessage()
- func (m *RecordingRule) Reset()
- func (m *RecordingRule) Size() (n int)
- func (m *RecordingRule) String() string
- func (m *RecordingRule) Unmarshal(dAtA []byte) error
- func (m *RecordingRule) XXX_DiscardUnknown()
- func (m *RecordingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RecordingRule) XXX_Merge(src proto.Message)
- func (m *RecordingRule) XXX_Size() int
- func (m *RecordingRule) XXX_Unmarshal(b []byte) error
- type Rule
- func (r1 *Rule) Compare(r2 *Rule) int
- func (*Rule) Descriptor() ([]byte, []int)
- func (m *Rule) GetAlert() *Alert
- func (r *Rule) GetLabels() labels.Labels
- func (r *Rule) GetLastEvaluation() time.Time
- func (r *Rule) GetName() string
- func (r *Rule) GetQuery() string
- func (m *Rule) GetRecording() *RecordingRule
- func (m *Rule) GetResult() isRule_Result
- func (m *Rule) Marshal() (dAtA []byte, err error)
- func (m *Rule) MarshalJSON() ([]byte, error)
- func (m *Rule) MarshalTo(dAtA []byte) (int, error)
- func (m *Rule) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Rule) ProtoMessage()
- func (m *Rule) Reset()
- func (r *Rule) SetLabels(ls labels.Labels)
- func (m *Rule) Size() (n int)
- func (m *Rule) String() string
- func (m *Rule) Unmarshal(dAtA []byte) error
- func (m *Rule) UnmarshalJSON(entry []byte) error
- func (m *Rule) XXX_DiscardUnknown()
- func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Rule) XXX_Merge(src proto.Message)
- func (*Rule) XXX_OneofWrappers() []interface{}
- func (m *Rule) XXX_Size() int
- func (m *Rule) XXX_Unmarshal(b []byte) error
- type RuleGroup
- func (r1 *RuleGroup) Compare(r2 *RuleGroup) int
- func (*RuleGroup) Descriptor() ([]byte, []int)
- func (r *RuleGroup) Key() string
- func (m *RuleGroup) Marshal() (dAtA []byte, err error)
- func (r *RuleGroup) MarshalJSON() ([]byte, error)
- func (m *RuleGroup) MarshalTo(dAtA []byte) (int, error)
- func (m *RuleGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RuleGroup) ProtoMessage()
- func (m *RuleGroup) Reset()
- func (m *RuleGroup) Size() (n int)
- func (m *RuleGroup) String() string
- func (m *RuleGroup) Unmarshal(dAtA []byte) error
- func (m *RuleGroup) XXX_DiscardUnknown()
- func (m *RuleGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RuleGroup) XXX_Merge(src proto.Message)
- func (m *RuleGroup) XXX_Size() int
- func (m *RuleGroup) XXX_Unmarshal(b []byte) error
- type RuleGroups
- func (*RuleGroups) Descriptor() ([]byte, []int)
- func (m *RuleGroups) Marshal() (dAtA []byte, err error)
- func (r *RuleGroups) MarshalJSON() ([]byte, error)
- func (m *RuleGroups) MarshalTo(dAtA []byte) (int, error)
- func (m *RuleGroups) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RuleGroups) ProtoMessage()
- func (m *RuleGroups) Reset()
- func (m *RuleGroups) Size() (n int)
- func (m *RuleGroups) String() string
- func (m *RuleGroups) Unmarshal(dAtA []byte) error
- func (m *RuleGroups) XXX_DiscardUnknown()
- func (m *RuleGroups) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RuleGroups) XXX_Merge(src proto.Message)
- func (m *RuleGroups) XXX_Size() int
- func (m *RuleGroups) XXX_Unmarshal(b []byte) error
- type Rule_Alert
- type Rule_Recording
- type RulesClient
- type RulesRequest
- func (*RulesRequest) Descriptor() ([]byte, []int)
- func (m *RulesRequest) Marshal() (dAtA []byte, err error)
- func (m *RulesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RulesRequest) ProtoMessage()
- func (m *RulesRequest) Reset()
- func (m *RulesRequest) Size() (n int)
- func (m *RulesRequest) String() string
- func (m *RulesRequest) Unmarshal(dAtA []byte) error
- func (m *RulesRequest) XXX_DiscardUnknown()
- func (m *RulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RulesRequest) XXX_Merge(src proto.Message)
- func (m *RulesRequest) XXX_Size() int
- func (m *RulesRequest) XXX_Unmarshal(b []byte) error
- type RulesRequest_Type
- type RulesResponse
- func (*RulesResponse) Descriptor() ([]byte, []int)
- func (m *RulesResponse) GetGroup() *RuleGroup
- func (m *RulesResponse) GetResult() isRulesResponse_Result
- func (m *RulesResponse) GetWarning() string
- func (m *RulesResponse) Marshal() (dAtA []byte, err error)
- func (m *RulesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *RulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RulesResponse) ProtoMessage()
- func (m *RulesResponse) Reset()
- func (m *RulesResponse) Size() (n int)
- func (m *RulesResponse) String() string
- func (m *RulesResponse) Unmarshal(dAtA []byte) error
- func (m *RulesResponse) XXX_DiscardUnknown()
- func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RulesResponse) XXX_Merge(src proto.Message)
- func (*RulesResponse) XXX_OneofWrappers() []interface{}
- func (m *RulesResponse) XXX_Size() int
- func (m *RulesResponse) XXX_Unmarshal(b []byte) error
- type RulesResponse_Group
- type RulesResponse_Warning
- type RulesServer
- type Rules_RulesClient
- type Rules_RulesServer
- type UnimplementedRulesServer
Constants ¶
const ( RuleRecordingType = "recording" RuleAlertingType = "alerting" )
Variables ¶
var ( ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowRpc = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group") )
var AlertState_name = map[int32]string{
0: "INACTIVE",
1: "PENDING",
2: "FIRING",
}
var AlertState_value = map[string]int32{
"INACTIVE": 0,
"PENDING": 1,
"FIRING": 2,
}
var RulesRequest_Type_name = map[int32]string{
0: "ALL",
1: "ALERT",
2: "RECORD",
}
var RulesRequest_Type_value = map[string]int32{
"ALL": 0,
"ALERT": 1,
"RECORD": 2,
}
Functions ¶
func RegisterRulesServer ¶
func RegisterRulesServer(s *grpc.Server, srv RulesServer)
Types ¶
type Alert ¶
type Alert struct { /// state returns the maximum state of alert instances for this rule. State AlertState `protobuf:"varint,1,opt,name=state,proto3,enum=thanos.AlertState" json:"state"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query"` DurationSeconds float64 `protobuf:"fixed64,4,opt,name=duration_seconds,json=durationSeconds,proto3" json:"duration"` Labels labelpb.ZLabelSet `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels"` Annotations labelpb.ZLabelSet `protobuf:"bytes,6,opt,name=annotations,proto3" json:"annotations"` Alerts []*AlertInstance `protobuf:"bytes,7,rep,name=alerts,proto3" json:"alerts"` Health string `protobuf:"bytes,8,opt,name=health,proto3" json:"health"` LastError string `protobuf:"bytes,9,opt,name=last_error,json=lastError,proto3" json:"lastError,omitempty"` EvaluationDurationSeconds float64 `protobuf:"fixed64,10,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` LastEvaluation time.Time `protobuf:"bytes,11,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` KeepFiringForSeconds float64 `protobuf:"fixed64,12,opt,name=keep_firing_for_seconds,json=keepFiringForSeconds,proto3" json:"keepFiringFor"` }
func (*Alert) Compare ¶
Compare compares two equal alerting rules a1 and a2 and returns:
< 0 if a1 < a2 if rule a1 is lexically before rule a2 0 if a1 == a2 > 0 if a1 > a2 if rule a1 is lexically after rule a2
More formally, the ordering is determined in the following order:
1. alert state 2. alert last evaluation (earlier evaluation comes first)
Note: This method assumes a1 and a2 are logically equal as per Rule#Compare.
func (*Alert) Descriptor ¶
func (*Alert) ProtoMessage ¶
func (*Alert) ProtoMessage()
func (*Alert) XXX_DiscardUnknown ¶
func (m *Alert) XXX_DiscardUnknown()
func (*Alert) XXX_Marshal ¶
func (*Alert) XXX_Unmarshal ¶
type AlertInstance ¶
type AlertInstance struct { Labels labelpb.ZLabelSet `protobuf:"bytes,1,opt,name=labels,proto3" json:"labels"` Annotations labelpb.ZLabelSet `protobuf:"bytes,2,opt,name=annotations,proto3" json:"annotations"` State AlertState `protobuf:"varint,3,opt,name=state,proto3,enum=thanos.AlertState" json:"state"` ActiveAt *time.Time `protobuf:"bytes,4,opt,name=active_at,json=activeAt,proto3,stdtime" json:"activeAt,omitempty"` Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value"` // Thanos specific. Used mainly for alert API purposes. PartialResponseStrategy storepb.PartialResponseStrategy `` /* 126-byte string literal not displayed */ }
func (*AlertInstance) Descriptor ¶
func (*AlertInstance) Descriptor() ([]byte, []int)
func (*AlertInstance) Marshal ¶
func (m *AlertInstance) Marshal() (dAtA []byte, err error)
func (*AlertInstance) MarshalToSizedBuffer ¶
func (m *AlertInstance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AlertInstance) ProtoMessage ¶
func (*AlertInstance) ProtoMessage()
func (*AlertInstance) Reset ¶
func (m *AlertInstance) Reset()
func (*AlertInstance) Size ¶
func (m *AlertInstance) Size() (n int)
func (*AlertInstance) String ¶
func (m *AlertInstance) String() string
func (*AlertInstance) Unmarshal ¶
func (m *AlertInstance) Unmarshal(dAtA []byte) error
func (*AlertInstance) XXX_DiscardUnknown ¶
func (m *AlertInstance) XXX_DiscardUnknown()
func (*AlertInstance) XXX_Marshal ¶
func (m *AlertInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AlertInstance) XXX_Merge ¶
func (m *AlertInstance) XXX_Merge(src proto.Message)
func (*AlertInstance) XXX_Size ¶
func (m *AlertInstance) XXX_Size() int
func (*AlertInstance) XXX_Unmarshal ¶
func (m *AlertInstance) XXX_Unmarshal(b []byte) error
type AlertState ¶
type AlertState int32
/ AlertState represents state of the alert. Has to match 1:1 Prometheus AlertState:
StateInactive is the state of an alert that is neither firing nor pending. StateInactive AlertState = iota StatePending is the state of an alert that has been active for less than the configured threshold duration. StatePending StateFiring is the state of an alert that has been active for longer than the configured threshold duration. StateFiring
const ( AlertState_INACTIVE AlertState = 0 AlertState_PENDING AlertState = 1 AlertState_FIRING AlertState = 2 )
func (AlertState) Compare ¶
func (x AlertState) Compare(y AlertState) int
Compare compares alert state x and y and returns:
< 0 if x < y (alert state x is more critical than alert state y) 0 if x == y > 0 if x > y (alert state x is less critical than alert state y)
For sorting this makes sure that more "critical" alert states come first.
func (AlertState) EnumDescriptor ¶
func (AlertState) EnumDescriptor() ([]byte, []int)
func (*AlertState) MarshalJSON ¶
func (x *AlertState) MarshalJSON() ([]byte, error)
func (AlertState) String ¶
func (x AlertState) String() string
func (*AlertState) UnmarshalJSON ¶
func (x *AlertState) UnmarshalJSON(entry []byte) error
type RecordingRule ¶
type RecordingRule struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query"` Labels labelpb.ZLabelSet `protobuf:"bytes,3,opt,name=labels,proto3" json:"labels"` Health string `protobuf:"bytes,4,opt,name=health,proto3" json:"health"` LastError string `protobuf:"bytes,5,opt,name=last_error,json=lastError,proto3" json:"lastError,omitempty"` EvaluationDurationSeconds float64 `protobuf:"fixed64,6,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` LastEvaluation time.Time `protobuf:"bytes,7,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` }
func (*RecordingRule) Compare ¶
func (r1 *RecordingRule) Compare(r2 *RecordingRule) int
Compare compares equal recording rules r1 and r2 and returns:
< 0 if r1 < r2 if rule r1 is lexically before rule r2 0 if r1 == r2 > 0 if r1 > r2 if rule r1 is lexically after rule r2
More formally, the ordering is determined in the following order:
1. recording rule last evaluation (earlier evaluation comes first)
Note: This method assumes r1 and r2 are logically equal as per Rule#Compare.
func (*RecordingRule) Descriptor ¶
func (*RecordingRule) Descriptor() ([]byte, []int)
func (*RecordingRule) Marshal ¶
func (m *RecordingRule) Marshal() (dAtA []byte, err error)
func (*RecordingRule) MarshalToSizedBuffer ¶
func (m *RecordingRule) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RecordingRule) ProtoMessage ¶
func (*RecordingRule) ProtoMessage()
func (*RecordingRule) Reset ¶
func (m *RecordingRule) Reset()
func (*RecordingRule) Size ¶
func (m *RecordingRule) Size() (n int)
func (*RecordingRule) String ¶
func (m *RecordingRule) String() string
func (*RecordingRule) Unmarshal ¶
func (m *RecordingRule) Unmarshal(dAtA []byte) error
func (*RecordingRule) XXX_DiscardUnknown ¶
func (m *RecordingRule) XXX_DiscardUnknown()
func (*RecordingRule) XXX_Marshal ¶
func (m *RecordingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RecordingRule) XXX_Merge ¶
func (m *RecordingRule) XXX_Merge(src proto.Message)
func (*RecordingRule) XXX_Size ¶
func (m *RecordingRule) XXX_Size() int
func (*RecordingRule) XXX_Unmarshal ¶
func (m *RecordingRule) XXX_Unmarshal(b []byte) error
type Rule ¶
type Rule struct { // Types that are valid to be assigned to Result: // *Rule_Recording // *Rule_Alert Result isRule_Result `protobuf_oneof:"result"` }
func NewAlertingRule ¶
func NewRecordingRule ¶
func NewRecordingRule(r *RecordingRule) *Rule
func (*Rule) Compare ¶
Compare compares recording and alerting rules r1 and r2 and returns:
< 0 if r1 < r2 if rule r1 is not equal and lexically before rule r2 0 if r1 == r2 if rule r1 is logically equal to r2 (r1 and r2 are the "same" rules) > 0 if r1 > r2 if rule r1 is not equal and lexically after rule r2
More formally, ordering and equality is determined in the following order:
1. rule type (alerting rules come before recording rules) 2. rule name 3. rule labels 4. rule query 5. for alerting rules: duration
Note: this can still leave ordering undetermined for equal rules (x == y). For determining ordering of equal rules, use Alert#Compare or RecordingRule#Compare.
func (*Rule) Descriptor ¶
func (*Rule) GetLastEvaluation ¶
func (*Rule) GetRecording ¶
func (m *Rule) GetRecording() *RecordingRule
func (*Rule) MarshalJSON ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) UnmarshalJSON ¶
func (*Rule) XXX_DiscardUnknown ¶
func (m *Rule) XXX_DiscardUnknown()
func (*Rule) XXX_OneofWrappers ¶
func (*Rule) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Rule) XXX_Unmarshal ¶
type RuleGroup ¶
type RuleGroup struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file"` Rules []*Rule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules"` Interval float64 `protobuf:"fixed64,4,opt,name=interval,proto3" json:"interval"` EvaluationDurationSeconds float64 `protobuf:"fixed64,5,opt,name=evaluation_duration_seconds,json=evaluationDurationSeconds,proto3" json:"evaluationTime"` LastEvaluation time.Time `protobuf:"bytes,6,opt,name=last_evaluation,json=lastEvaluation,proto3,stdtime" json:"lastEvaluation"` Limit int64 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit"` // Thanos specific. PartialResponseStrategy storepb.PartialResponseStrategy `` /* 126-byte string literal not displayed */ }
/ RuleGroup has info for rules which are part of a group.
func (*RuleGroup) Compare ¶ added in v0.15.0
Compare compares rule group x and y and returns:
< 0 if x < y if rule group r1 is not equal and lexically before rule group r2 0 if x == y if rule group r1 is logically equal to r2 (r1 and r2 are the "same" rule groups) > 0 if x > y if rule group r1 is not equal and lexically after rule group r2
func (*RuleGroup) Descriptor ¶
func (*RuleGroup) Key ¶ added in v0.15.0
Key returns the group key similar resembling Prometheus logic. See https://github.com/prometheus/prometheus/blob/869f1bc587e667b79721852d5badd9f70a39fc3f/rules/manager.go#L1062-L1065
func (*RuleGroup) MarshalJSON ¶ added in v0.15.0
func (*RuleGroup) MarshalToSizedBuffer ¶
func (*RuleGroup) ProtoMessage ¶
func (*RuleGroup) ProtoMessage()
func (*RuleGroup) XXX_DiscardUnknown ¶
func (m *RuleGroup) XXX_DiscardUnknown()
func (*RuleGroup) XXX_Marshal ¶
func (*RuleGroup) XXX_Unmarshal ¶
type RuleGroups ¶
type RuleGroups struct {
Groups []*RuleGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups"`
}
/ RuleGroups is set of rule groups. / This and below APIs are meant to be used for unmarshaling and marshsaling rules from/to Prometheus API. / That's why json tag has to be customized and matching https://github.com/prometheus/prometheus/blob/c530b4b456cc5f9ec249f771dff187eb7715dc9b/web/api/v1/api.go#L955 / NOTE: See rules_custom_test.go for compatibility tests. / / For rule parsing from YAML configuration other struct is used: https://github.com/prometheus/prometheus/blob/20b1f596f6fb16107ef0c244d240b0ad6da36829/pkg/rulefmt/rulefmt.go#L105
func (*RuleGroups) Descriptor ¶
func (*RuleGroups) Descriptor() ([]byte, []int)
func (*RuleGroups) Marshal ¶
func (m *RuleGroups) Marshal() (dAtA []byte, err error)
func (*RuleGroups) MarshalJSON ¶ added in v0.15.0
func (r *RuleGroups) MarshalJSON() ([]byte, error)
func (*RuleGroups) MarshalToSizedBuffer ¶
func (m *RuleGroups) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RuleGroups) ProtoMessage ¶
func (*RuleGroups) ProtoMessage()
func (*RuleGroups) Reset ¶
func (m *RuleGroups) Reset()
func (*RuleGroups) Size ¶
func (m *RuleGroups) Size() (n int)
func (*RuleGroups) String ¶
func (m *RuleGroups) String() string
func (*RuleGroups) Unmarshal ¶
func (m *RuleGroups) Unmarshal(dAtA []byte) error
func (*RuleGroups) XXX_DiscardUnknown ¶
func (m *RuleGroups) XXX_DiscardUnknown()
func (*RuleGroups) XXX_Marshal ¶
func (m *RuleGroups) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RuleGroups) XXX_Merge ¶
func (m *RuleGroups) XXX_Merge(src proto.Message)
func (*RuleGroups) XXX_Size ¶
func (m *RuleGroups) XXX_Size() int
func (*RuleGroups) XXX_Unmarshal ¶
func (m *RuleGroups) XXX_Unmarshal(b []byte) error
type Rule_Alert ¶
type Rule_Alert struct {
Alert *Alert `protobuf:"bytes,2,opt,name=alert,proto3,oneof" json:"alert,omitempty"`
}
func (*Rule_Alert) MarshalToSizedBuffer ¶
func (m *Rule_Alert) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Rule_Alert) Size ¶
func (m *Rule_Alert) Size() (n int)
type Rule_Recording ¶
type Rule_Recording struct {
Recording *RecordingRule `protobuf:"bytes,1,opt,name=recording,proto3,oneof" json:"recording,omitempty"`
}
func (*Rule_Recording) MarshalToSizedBuffer ¶
func (m *Rule_Recording) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Rule_Recording) Size ¶
func (m *Rule_Recording) Size() (n int)
type RulesClient ¶
type RulesClient interface { /// Rules has info for all rules. /// Returned rules are expected to include external labels. Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (Rules_RulesClient, error) }
RulesClient is the client API for Rules service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRulesClient ¶
func NewRulesClient(cc *grpc.ClientConn) RulesClient
type RulesRequest ¶
type RulesRequest struct { Type RulesRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=thanos.RulesRequest_Type" json:"type,omitempty"` PartialResponseStrategy storepb.PartialResponseStrategy `` /* 169-byte string literal not displayed */ MatcherString []string `protobuf:"bytes,3,rep,name=matcher_string,json=matcherString,proto3" json:"matcher_string,omitempty"` RuleName []string `protobuf:"bytes,4,rep,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"` RuleGroup []string `protobuf:"bytes,5,rep,name=rule_group,json=ruleGroup,proto3" json:"rule_group,omitempty"` File []string `protobuf:"bytes,6,rep,name=file,proto3" json:"file,omitempty"` }
func (*RulesRequest) Descriptor ¶
func (*RulesRequest) Descriptor() ([]byte, []int)
func (*RulesRequest) Marshal ¶
func (m *RulesRequest) Marshal() (dAtA []byte, err error)
func (*RulesRequest) MarshalToSizedBuffer ¶
func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RulesRequest) ProtoMessage ¶
func (*RulesRequest) ProtoMessage()
func (*RulesRequest) Reset ¶
func (m *RulesRequest) Reset()
func (*RulesRequest) Size ¶
func (m *RulesRequest) Size() (n int)
func (*RulesRequest) String ¶
func (m *RulesRequest) String() string
func (*RulesRequest) Unmarshal ¶
func (m *RulesRequest) Unmarshal(dAtA []byte) error
func (*RulesRequest) XXX_DiscardUnknown ¶
func (m *RulesRequest) XXX_DiscardUnknown()
func (*RulesRequest) XXX_Marshal ¶
func (m *RulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RulesRequest) XXX_Merge ¶
func (m *RulesRequest) XXX_Merge(src proto.Message)
func (*RulesRequest) XXX_Size ¶
func (m *RulesRequest) XXX_Size() int
func (*RulesRequest) XXX_Unmarshal ¶
func (m *RulesRequest) XXX_Unmarshal(b []byte) error
type RulesRequest_Type ¶
type RulesRequest_Type int32
const ( RulesRequest_ALL RulesRequest_Type = 0 /// This will make sure strings.ToLower(.String()) will match 'alert' and 'record' values for /// Prometheus HTTP API. /// NOTE: The implementation has to return empty rule groups as well. RulesRequest_ALERT RulesRequest_Type = 1 RulesRequest_RECORD RulesRequest_Type = 2 )
func (RulesRequest_Type) EnumDescriptor ¶
func (RulesRequest_Type) EnumDescriptor() ([]byte, []int)
func (RulesRequest_Type) String ¶
func (x RulesRequest_Type) String() string
type RulesResponse ¶
type RulesResponse struct { // Types that are valid to be assigned to Result: // *RulesResponse_Group // *RulesResponse_Warning Result isRulesResponse_Result `protobuf_oneof:"result"` }
func NewRuleGroupRulesResponse ¶
func NewRuleGroupRulesResponse(rg *RuleGroup) *RulesResponse
func NewWarningRulesResponse ¶
func NewWarningRulesResponse(warning error) *RulesResponse
func (*RulesResponse) Descriptor ¶
func (*RulesResponse) Descriptor() ([]byte, []int)
func (*RulesResponse) GetGroup ¶
func (m *RulesResponse) GetGroup() *RuleGroup
func (*RulesResponse) GetResult ¶
func (m *RulesResponse) GetResult() isRulesResponse_Result
func (*RulesResponse) GetWarning ¶
func (m *RulesResponse) GetWarning() string
func (*RulesResponse) Marshal ¶
func (m *RulesResponse) Marshal() (dAtA []byte, err error)
func (*RulesResponse) MarshalToSizedBuffer ¶
func (m *RulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RulesResponse) ProtoMessage ¶
func (*RulesResponse) ProtoMessage()
func (*RulesResponse) Reset ¶
func (m *RulesResponse) Reset()
func (*RulesResponse) Size ¶
func (m *RulesResponse) Size() (n int)
func (*RulesResponse) String ¶
func (m *RulesResponse) String() string
func (*RulesResponse) Unmarshal ¶
func (m *RulesResponse) Unmarshal(dAtA []byte) error
func (*RulesResponse) XXX_DiscardUnknown ¶
func (m *RulesResponse) XXX_DiscardUnknown()
func (*RulesResponse) XXX_Marshal ¶
func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RulesResponse) XXX_Merge ¶
func (m *RulesResponse) XXX_Merge(src proto.Message)
func (*RulesResponse) XXX_OneofWrappers ¶
func (*RulesResponse) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*RulesResponse) XXX_Size ¶
func (m *RulesResponse) XXX_Size() int
func (*RulesResponse) XXX_Unmarshal ¶
func (m *RulesResponse) XXX_Unmarshal(b []byte) error
type RulesResponse_Group ¶
type RulesResponse_Group struct {
Group *RuleGroup `protobuf:"bytes,1,opt,name=group,proto3,oneof" json:"group,omitempty"`
}
func (*RulesResponse_Group) MarshalTo ¶
func (m *RulesResponse_Group) MarshalTo(dAtA []byte) (int, error)
func (*RulesResponse_Group) MarshalToSizedBuffer ¶
func (m *RulesResponse_Group) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RulesResponse_Group) Size ¶
func (m *RulesResponse_Group) Size() (n int)
type RulesResponse_Warning ¶
type RulesResponse_Warning struct {
Warning string `protobuf:"bytes,2,opt,name=warning,proto3,oneof" json:"warning,omitempty"`
}
func (*RulesResponse_Warning) MarshalTo ¶
func (m *RulesResponse_Warning) MarshalTo(dAtA []byte) (int, error)
func (*RulesResponse_Warning) MarshalToSizedBuffer ¶
func (m *RulesResponse_Warning) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RulesResponse_Warning) Size ¶
func (m *RulesResponse_Warning) Size() (n int)
type RulesServer ¶
type RulesServer interface { /// Rules has info for all rules. /// Returned rules are expected to include external labels. Rules(*RulesRequest, Rules_RulesServer) error }
RulesServer is the server API for Rules service.
type Rules_RulesClient ¶
type Rules_RulesClient interface { Recv() (*RulesResponse, error) grpc.ClientStream }
type Rules_RulesServer ¶
type Rules_RulesServer interface { Send(*RulesResponse) error grpc.ServerStream }
type UnimplementedRulesServer ¶
type UnimplementedRulesServer struct { }
UnimplementedRulesServer can be embedded to have forward compatible implementations.
func (*UnimplementedRulesServer) Rules ¶
func (*UnimplementedRulesServer) Rules(req *RulesRequest, srv Rules_RulesServer) error