rules

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuleSync_SyncRules_FullMethodName = "/alerting.rules.RuleSync/SyncRules"
)

Variables

View Source
var File_github_com_rancher_opni_plugins_alerting_pkg_apis_rules_rules_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetAnnotations

func (x *Rule) GetAnnotations() map[string]string

func (*Rule) GetDuration

func (x *Rule) GetDuration() *durationpb.Duration

func (*Rule) GetExpr

func (x *Rule) GetExpr() string

func (*Rule) GetGroupId

func (x *Rule) GetGroupId() *v1.Reference

func (*Rule) GetLabels

func (x *Rule) GetLabels() map[string]string

func (*Rule) GetName

func (x *Rule) GetName() string

func (*Rule) GetRuleId

func (x *Rule) GetRuleId() *v1.Reference

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

func (x *Rule) ProtoReflect() protoreflect.Message

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL