Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRuleSyncServer(s grpc.ServiceRegistrar, srv RuleSyncServer)
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)deprecated
- func (x *Rule) GetAnnotations() map[string]string
- func (x *Rule) GetDuration() *durationpb.Duration
- func (x *Rule) GetExpr() string
- func (x *Rule) GetGroupId() *v1.Reference
- func (x *Rule) GetLabels() map[string]string
- func (x *Rule) GetName() string
- func (x *Rule) GetRuleId() *v1.Reference
- func (*Rule) ProtoMessage()
- func (x *Rule) ProtoReflect() protoreflect.Message
- func (x *Rule) Reset()
- func (x *Rule) String() string
- type RuleManifest
- type RuleSyncClient
- type RuleSyncServer
- type UnimplementedRuleSyncServer
- type UnsafeRuleSyncServer
Constants ¶
const (
RuleSync_SyncRules_FullMethodName = "/alerting.rules.RuleSync/SyncRules"
)
Variables ¶
var File_github_com_rancher_opni_plugins_alerting_pkg_apis_rules_rules_proto protoreflect.FileDescriptor
var RuleSync_ServiceDesc = grpc.ServiceDesc{ ServiceName: "alerting.rules.RuleSync", HandlerType: (*RuleSyncServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SyncRules", Handler: _RuleSync_SyncRules_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/plugins/alerting/pkg/apis/rules/rules.proto", }
RuleSync_ServiceDesc is the grpc.ServiceDesc for RuleSync service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRuleSyncServer ¶
func RegisterRuleSyncServer(s grpc.ServiceRegistrar, srv RuleSyncServer)
Types ¶
type Rule ¶
type Rule struct { RuleId *v1.Reference `protobuf:"bytes,1,opt,name=ruleId,proto3" json:"ruleId,omitempty"` GroupId *v1.Reference `protobuf:"bytes,2,opt,name=groupId,proto3" json:"groupId,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Expr string `protobuf:"bytes,4,opt,name=expr,proto3" json:"expr,omitempty"` Duration *durationpb.Duration `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"` Labels map[string]string `` /* 153-byte string literal not displayed */ Annotations map[string]string `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Rule) Descriptor
deprecated
func (*Rule) GetAnnotations ¶
func (*Rule) GetDuration ¶
func (x *Rule) GetDuration() *durationpb.Duration
func (*Rule) GetGroupId ¶
func (*Rule) ProtoMessage ¶
func (*Rule) ProtoMessage()
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type RuleManifest ¶
type RuleManifest struct { Rules []*Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` // contains filtered or unexported fields }
func (*RuleManifest) Descriptor
deprecated
func (*RuleManifest) Descriptor() ([]byte, []int)
Deprecated: Use RuleManifest.ProtoReflect.Descriptor instead.
func (*RuleManifest) GetRules ¶
func (x *RuleManifest) GetRules() []*Rule
func (*RuleManifest) ProtoMessage ¶
func (*RuleManifest) ProtoMessage()
func (*RuleManifest) ProtoReflect ¶
func (x *RuleManifest) ProtoReflect() protoreflect.Message
func (*RuleManifest) Reset ¶
func (x *RuleManifest) Reset()
func (*RuleManifest) String ¶
func (x *RuleManifest) String() string
type RuleSyncClient ¶
type RuleSyncClient interface {
SyncRules(ctx context.Context, in *RuleManifest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
RuleSyncClient is the client API for RuleSync service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRuleSyncClient ¶
func NewRuleSyncClient(cc grpc.ClientConnInterface) RuleSyncClient
type RuleSyncServer ¶
type RuleSyncServer interface { SyncRules(context.Context, *RuleManifest) (*emptypb.Empty, error) // contains filtered or unexported methods }
RuleSyncServer is the server API for RuleSync service. All implementations must embed UnimplementedRuleSyncServer for forward compatibility
type UnimplementedRuleSyncServer ¶
type UnimplementedRuleSyncServer struct { }
UnimplementedRuleSyncServer must be embedded to have forward compatible implementations.
func (UnimplementedRuleSyncServer) SyncRules ¶
func (UnimplementedRuleSyncServer) SyncRules(context.Context, *RuleManifest) (*emptypb.Empty, error)
type UnsafeRuleSyncServer ¶
type UnsafeRuleSyncServer interface {
// contains filtered or unexported methods
}
UnsafeRuleSyncServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RuleSyncServer will result in compilation errors.