Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAlertingAdminServer(s grpc.ServiceRegistrar, srv AlertingAdminServer)
- func RegisterConfigReconcilerServer(s grpc.ServiceRegistrar, srv ConfigReconcilerServer)
- type AlertingAdminClient
- type AlertingAdminServer
- type ClusterConfiguration
- func (*ClusterConfiguration) Descriptor() ([]byte, []int)deprecated
- func (x *ClusterConfiguration) GetClusterGossipInterval() string
- func (x *ClusterConfiguration) GetClusterPushPullInterval() string
- func (x *ClusterConfiguration) GetClusterSettleTimeout() string
- func (x *ClusterConfiguration) GetNumReplicas() int32
- func (x *ClusterConfiguration) GetResourceLimits() *ResourceLimitSpec
- func (*ClusterConfiguration) ProtoMessage()
- func (x *ClusterConfiguration) ProtoReflect() protoreflect.Message
- func (x *ClusterConfiguration) Reset()
- func (x *ClusterConfiguration) String() string
- func (c *ClusterConfiguration) Validate() error
- type ConfigReconcilerClient
- type ConfigReconcilerServer
- type ConfigReconciler_ConnectRemoteSyncerClient
- type ConfigReconciler_ConnectRemoteSyncerServer
- type ConnectRequest
- type InstallState
- func (InstallState) Descriptor() protoreflect.EnumDescriptor
- func (x InstallState) Enum() *InstallState
- func (InstallState) EnumDescriptor() ([]byte, []int)deprecated
- func (x InstallState) Number() protoreflect.EnumNumber
- func (x InstallState) String() string
- func (InstallState) Type() protoreflect.EnumType
- type InstallStatus
- func (*InstallStatus) Descriptor() ([]byte, []int)deprecated
- func (x *InstallStatus) GetConditions() []string
- func (x *InstallStatus) GetMetadata() map[string]string
- func (x *InstallStatus) GetState() InstallState
- func (x *InstallStatus) GetVersion() string
- func (*InstallStatus) ProtoMessage()
- func (x *InstallStatus) ProtoReflect() protoreflect.Message
- func (x *InstallStatus) Reset()
- func (x *InstallStatus) String() string
- type OpsClientOption
- type OpsClientOptions
- type ResourceLimitSpec
- func (*ResourceLimitSpec) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceLimitSpec) GetCpu() string
- func (x *ResourceLimitSpec) GetMemory() string
- func (x *ResourceLimitSpec) GetStorage() string
- func (*ResourceLimitSpec) ProtoMessage()
- func (x *ResourceLimitSpec) ProtoReflect() protoreflect.Message
- func (x *ResourceLimitSpec) Reset()
- func (x *ResourceLimitSpec) String() string
- func (r *ResourceLimitSpec) Validate() error
- type SyncRequest
- type UnimplementedAlertingAdminServer
- func (UnimplementedAlertingAdminServer) ConfigureCluster(context.Context, *ClusterConfiguration) (*emptypb.Empty, error)
- func (UnimplementedAlertingAdminServer) GetClusterConfiguration(context.Context, *emptypb.Empty) (*ClusterConfiguration, error)
- func (UnimplementedAlertingAdminServer) GetClusterStatus(context.Context, *emptypb.Empty) (*InstallStatus, error)
- func (UnimplementedAlertingAdminServer) InstallCluster(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (UnimplementedAlertingAdminServer) UninstallCluster(context.Context, *UninstallRequest) (*emptypb.Empty, error)
- type UnimplementedConfigReconcilerServer
- type UninstallRequest
- type UnsafeAlertingAdminServer
- type UnsafeConfigReconcilerServer
Constants ¶
const ( AlertingAdmin_GetClusterConfiguration_FullMethodName = "/alerting.ops.AlertingAdmin/GetClusterConfiguration" AlertingAdmin_ConfigureCluster_FullMethodName = "/alerting.ops.AlertingAdmin/ConfigureCluster" AlertingAdmin_GetClusterStatus_FullMethodName = "/alerting.ops.AlertingAdmin/GetClusterStatus" AlertingAdmin_InstallCluster_FullMethodName = "/alerting.ops.AlertingAdmin/InstallCluster" AlertingAdmin_UninstallCluster_FullMethodName = "/alerting.ops.AlertingAdmin/UninstallCluster" )
const (
ConfigReconciler_ConnectRemoteSyncer_FullMethodName = "/alerting.ops.ConfigReconciler/ConnectRemoteSyncer"
)
Variables ¶
var ( InstallState_name = map[int32]string{ 0: "InstallUnknown", 1: "NotInstalled", 2: "InstallUpdating", 3: "Installed", 4: "Uninstalling", } InstallState_value = map[string]int32{ "InstallUnknown": 0, "NotInstalled": 1, "InstallUpdating": 2, "Installed": 3, "Uninstalling": 4, } )
Enum value maps for InstallState.
var AlertingAdmin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "alerting.ops.AlertingAdmin", HandlerType: (*AlertingAdminServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetClusterConfiguration", Handler: _AlertingAdmin_GetClusterConfiguration_Handler, }, { MethodName: "ConfigureCluster", Handler: _AlertingAdmin_ConfigureCluster_Handler, }, { MethodName: "GetClusterStatus", Handler: _AlertingAdmin_GetClusterStatus_Handler, }, { MethodName: "InstallCluster", Handler: _AlertingAdmin_InstallCluster_Handler, }, { MethodName: "UninstallCluster", Handler: _AlertingAdmin_UninstallCluster_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/plugins/alerting/apis/alertops/alertops.proto", }
AlertingAdmin_ServiceDesc is the grpc.ServiceDesc for AlertingAdmin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ConfigReconciler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "alerting.ops.ConfigReconciler", HandlerType: (*ConfigReconcilerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ConnectRemoteSyncer", Handler: _ConfigReconciler_ConnectRemoteSyncer_Handler, ServerStreams: true, }, }, Metadata: "github.com/rancher/opni/plugins/alerting/apis/alertops/alertops.proto", }
ConfigReconciler_ServiceDesc is the grpc.ServiceDesc for ConfigReconciler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_github_com_rancher_opni_plugins_alerting_apis_alertops_alertops_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAlertingAdminServer ¶
func RegisterAlertingAdminServer(s grpc.ServiceRegistrar, srv AlertingAdminServer)
func RegisterConfigReconcilerServer ¶
func RegisterConfigReconcilerServer(s grpc.ServiceRegistrar, srv ConfigReconcilerServer)
Types ¶
type AlertingAdminClient ¶
type AlertingAdminClient interface { GetClusterConfiguration(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ClusterConfiguration, error) // Install/Uninstall the alerting cluster by setting enabled=true/false ConfigureCluster(ctx context.Context, in *ClusterConfiguration, opts ...grpc.CallOption) (*emptypb.Empty, error) GetClusterStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*InstallStatus, error) InstallCluster(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) UninstallCluster(ctx context.Context, in *UninstallRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
AlertingAdminClient is the client API for AlertingAdmin 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 NewAlertingAdminClient ¶
func NewAlertingAdminClient(cc grpc.ClientConnInterface) AlertingAdminClient
func NewClient ¶
func NewClient(ctx waitctx.PermissiveContext, opts ...OpsClientOption) (AlertingAdminClient, error)
type AlertingAdminServer ¶
type AlertingAdminServer interface { GetClusterConfiguration(context.Context, *emptypb.Empty) (*ClusterConfiguration, error) // Install/Uninstall the alerting cluster by setting enabled=true/false ConfigureCluster(context.Context, *ClusterConfiguration) (*emptypb.Empty, error) GetClusterStatus(context.Context, *emptypb.Empty) (*InstallStatus, error) InstallCluster(context.Context, *emptypb.Empty) (*emptypb.Empty, error) UninstallCluster(context.Context, *UninstallRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
AlertingAdminServer is the server API for AlertingAdmin service. All implementations must embed UnimplementedAlertingAdminServer for forward compatibility
type ClusterConfiguration ¶
type ClusterConfiguration struct { // number of replicas for the opni-alerting (odd-number for HA) NumReplicas int32 `protobuf:"varint,2,opt,name=numReplicas,proto3" json:"numReplicas,omitempty"` // Maximum time to wait for cluster // connections to settle before // evaluating notifications. ClusterSettleTimeout string `protobuf:"bytes,3,opt,name=clusterSettleTimeout,proto3" json:"clusterSettleTimeout,omitempty"` // Interval for gossip state syncs. // Setting this interval lower // (more frequent) will increase // convergence speeds across larger // clusters at the expense of // increased bandwidth usage. ClusterPushPullInterval string `protobuf:"bytes,4,opt,name=clusterPushPullInterval,proto3" json:"clusterPushPullInterval,omitempty"` // Interval between sending gossip // messages. By lowering this // value (more frequent) gossip // messages are propagated across // the cluster more quickly at the // expense of increased bandwidth. ClusterGossipInterval string `protobuf:"bytes,5,opt,name=clusterGossipInterval,proto3" json:"clusterGossipInterval,omitempty"` ResourceLimits *ResourceLimitSpec `protobuf:"bytes,6,opt,name=resourceLimits,proto3" json:"resourceLimits,omitempty"` // contains filtered or unexported fields }
func (*ClusterConfiguration) Descriptor
deprecated
func (*ClusterConfiguration) Descriptor() ([]byte, []int)
Deprecated: Use ClusterConfiguration.ProtoReflect.Descriptor instead.
func (*ClusterConfiguration) GetClusterGossipInterval ¶
func (x *ClusterConfiguration) GetClusterGossipInterval() string
func (*ClusterConfiguration) GetClusterPushPullInterval ¶
func (x *ClusterConfiguration) GetClusterPushPullInterval() string
func (*ClusterConfiguration) GetClusterSettleTimeout ¶
func (x *ClusterConfiguration) GetClusterSettleTimeout() string
func (*ClusterConfiguration) GetNumReplicas ¶
func (x *ClusterConfiguration) GetNumReplicas() int32
func (*ClusterConfiguration) GetResourceLimits ¶
func (x *ClusterConfiguration) GetResourceLimits() *ResourceLimitSpec
func (*ClusterConfiguration) ProtoMessage ¶
func (*ClusterConfiguration) ProtoMessage()
func (*ClusterConfiguration) ProtoReflect ¶
func (x *ClusterConfiguration) ProtoReflect() protoreflect.Message
func (*ClusterConfiguration) Reset ¶
func (x *ClusterConfiguration) Reset()
func (*ClusterConfiguration) String ¶
func (x *ClusterConfiguration) String() string
func (*ClusterConfiguration) Validate ¶
func (c *ClusterConfiguration) Validate() error
type ConfigReconcilerClient ¶
type ConfigReconcilerClient interface {
ConnectRemoteSyncer(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (ConfigReconciler_ConnectRemoteSyncerClient, error)
}
ConfigReconcilerClient is the client API for ConfigReconciler 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 NewConfigReconcilerClient ¶
func NewConfigReconcilerClient(cc grpc.ClientConnInterface) ConfigReconcilerClient
type ConfigReconcilerServer ¶
type ConfigReconcilerServer interface { ConnectRemoteSyncer(*ConnectRequest, ConfigReconciler_ConnectRemoteSyncerServer) error // contains filtered or unexported methods }
ConfigReconcilerServer is the server API for ConfigReconciler service. All implementations must embed UnimplementedConfigReconcilerServer for forward compatibility
type ConfigReconciler_ConnectRemoteSyncerClient ¶
type ConfigReconciler_ConnectRemoteSyncerClient interface { Recv() (*SyncRequest, error) grpc.ClientStream }
type ConfigReconciler_ConnectRemoteSyncerServer ¶
type ConfigReconciler_ConnectRemoteSyncerServer interface { Send(*SyncRequest) error grpc.ServerStream }
type ConnectRequest ¶
type ConnectRequest struct { LifecycleUuid string `protobuf:"bytes,1,opt,name=lifecycleUuid,proto3" json:"lifecycleUuid,omitempty"` // contains filtered or unexported fields }
func (*ConnectRequest) Descriptor
deprecated
func (*ConnectRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.
func (*ConnectRequest) GetLifecycleUuid ¶
func (x *ConnectRequest) GetLifecycleUuid() string
func (*ConnectRequest) ProtoMessage ¶
func (*ConnectRequest) ProtoMessage()
func (*ConnectRequest) ProtoReflect ¶
func (x *ConnectRequest) ProtoReflect() protoreflect.Message
func (*ConnectRequest) Reset ¶
func (x *ConnectRequest) Reset()
func (*ConnectRequest) String ¶
func (x *ConnectRequest) String() string
type InstallState ¶
type InstallState int32
const ( InstallState_InstallUnknown InstallState = 0 InstallState_NotInstalled InstallState = 1 InstallState_InstallUpdating InstallState = 2 InstallState_Installed InstallState = 3 InstallState_Uninstalling InstallState = 4 )
func (InstallState) Descriptor ¶
func (InstallState) Descriptor() protoreflect.EnumDescriptor
func (InstallState) Enum ¶
func (x InstallState) Enum() *InstallState
func (InstallState) EnumDescriptor
deprecated
func (InstallState) EnumDescriptor() ([]byte, []int)
Deprecated: Use InstallState.Descriptor instead.
func (InstallState) Number ¶
func (x InstallState) Number() protoreflect.EnumNumber
func (InstallState) String ¶
func (x InstallState) String() string
func (InstallState) Type ¶
func (InstallState) Type() protoreflect.EnumType
type InstallStatus ¶
type InstallStatus struct { State InstallState `protobuf:"varint,1,opt,name=state,proto3,enum=alerting.ops.InstallState" json:"state,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Conditions []string `protobuf:"bytes,4,rep,name=conditions,proto3" json:"conditions,omitempty"` // contains filtered or unexported fields }
func (*InstallStatus) Descriptor
deprecated
func (*InstallStatus) Descriptor() ([]byte, []int)
Deprecated: Use InstallStatus.ProtoReflect.Descriptor instead.
func (*InstallStatus) GetConditions ¶
func (x *InstallStatus) GetConditions() []string
func (*InstallStatus) GetMetadata ¶
func (x *InstallStatus) GetMetadata() map[string]string
func (*InstallStatus) GetState ¶
func (x *InstallStatus) GetState() InstallState
func (*InstallStatus) GetVersion ¶
func (x *InstallStatus) GetVersion() string
func (*InstallStatus) ProtoMessage ¶
func (*InstallStatus) ProtoMessage()
func (*InstallStatus) ProtoReflect ¶
func (x *InstallStatus) ProtoReflect() protoreflect.Message
func (*InstallStatus) Reset ¶
func (x *InstallStatus) Reset()
func (*InstallStatus) String ¶
func (x *InstallStatus) String() string
type OpsClientOption ¶
type OpsClientOption func(*OpsClientOptions)
func WithDialOptions ¶
func WithDialOptions(options ...grpc.DialOption) OpsClientOption
func WithListenAddress ¶
func WithListenAddress(addr string) OpsClientOption
type OpsClientOptions ¶
type OpsClientOptions struct {
// contains filtered or unexported fields
}
type ResourceLimitSpec ¶
type ResourceLimitSpec struct { // Storage resource limit for alerting volume Storage string `protobuf:"bytes,1,opt,name=storage,proto3" json:"storage,omitempty"` // CPU resource limit per replica Cpu string `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"` // Memory resource limit per replica Memory string `protobuf:"bytes,3,opt,name=memory,proto3" json:"memory,omitempty"` // contains filtered or unexported fields }
func (*ResourceLimitSpec) Descriptor
deprecated
func (*ResourceLimitSpec) Descriptor() ([]byte, []int)
Deprecated: Use ResourceLimitSpec.ProtoReflect.Descriptor instead.
func (*ResourceLimitSpec) GetCpu ¶
func (x *ResourceLimitSpec) GetCpu() string
func (*ResourceLimitSpec) GetMemory ¶
func (x *ResourceLimitSpec) GetMemory() string
func (*ResourceLimitSpec) GetStorage ¶
func (x *ResourceLimitSpec) GetStorage() string
func (*ResourceLimitSpec) ProtoMessage ¶
func (*ResourceLimitSpec) ProtoMessage()
func (*ResourceLimitSpec) ProtoReflect ¶
func (x *ResourceLimitSpec) ProtoReflect() protoreflect.Message
func (*ResourceLimitSpec) Reset ¶
func (x *ResourceLimitSpec) Reset()
func (*ResourceLimitSpec) String ¶
func (x *ResourceLimitSpec) String() string
func (*ResourceLimitSpec) Validate ¶
func (r *ResourceLimitSpec) Validate() error
type SyncRequest ¶
type SyncRequest struct { Items []*v1.PutConfigRequest `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*SyncRequest) Descriptor
deprecated
func (*SyncRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.
func (*SyncRequest) GetItems ¶
func (x *SyncRequest) GetItems() []*v1.PutConfigRequest
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) ProtoReflect ¶
func (x *SyncRequest) ProtoReflect() protoreflect.Message
func (*SyncRequest) Reset ¶
func (x *SyncRequest) Reset()
func (*SyncRequest) String ¶
func (x *SyncRequest) String() string
type UnimplementedAlertingAdminServer ¶
type UnimplementedAlertingAdminServer struct { }
UnimplementedAlertingAdminServer must be embedded to have forward compatible implementations.
func (UnimplementedAlertingAdminServer) ConfigureCluster ¶
func (UnimplementedAlertingAdminServer) ConfigureCluster(context.Context, *ClusterConfiguration) (*emptypb.Empty, error)
func (UnimplementedAlertingAdminServer) GetClusterConfiguration ¶
func (UnimplementedAlertingAdminServer) GetClusterConfiguration(context.Context, *emptypb.Empty) (*ClusterConfiguration, error)
func (UnimplementedAlertingAdminServer) GetClusterStatus ¶
func (UnimplementedAlertingAdminServer) GetClusterStatus(context.Context, *emptypb.Empty) (*InstallStatus, error)
func (UnimplementedAlertingAdminServer) InstallCluster ¶
func (UnimplementedAlertingAdminServer) UninstallCluster ¶
func (UnimplementedAlertingAdminServer) UninstallCluster(context.Context, *UninstallRequest) (*emptypb.Empty, error)
type UnimplementedConfigReconcilerServer ¶
type UnimplementedConfigReconcilerServer struct { }
UnimplementedConfigReconcilerServer must be embedded to have forward compatible implementations.
func (UnimplementedConfigReconcilerServer) ConnectRemoteSyncer ¶
func (UnimplementedConfigReconcilerServer) ConnectRemoteSyncer(*ConnectRequest, ConfigReconciler_ConnectRemoteSyncerServer) error
type UninstallRequest ¶
type UninstallRequest struct { DeleteData bool `protobuf:"varint,1,opt,name=deleteData,proto3" json:"deleteData,omitempty"` // contains filtered or unexported fields }
func (*UninstallRequest) Descriptor
deprecated
func (*UninstallRequest) Descriptor() ([]byte, []int)
Deprecated: Use UninstallRequest.ProtoReflect.Descriptor instead.
func (*UninstallRequest) GetDeleteData ¶
func (x *UninstallRequest) GetDeleteData() bool
func (*UninstallRequest) ProtoMessage ¶
func (*UninstallRequest) ProtoMessage()
func (*UninstallRequest) ProtoReflect ¶
func (x *UninstallRequest) ProtoReflect() protoreflect.Message
func (*UninstallRequest) Reset ¶
func (x *UninstallRequest) Reset()
func (*UninstallRequest) String ¶
func (x *UninstallRequest) String() string
type UnsafeAlertingAdminServer ¶
type UnsafeAlertingAdminServer interface {
// contains filtered or unexported methods
}
UnsafeAlertingAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AlertingAdminServer will result in compilation errors.
type UnsafeConfigReconcilerServer ¶
type UnsafeConfigReconcilerServer interface {
// contains filtered or unexported methods
}
UnsafeConfigReconcilerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigReconcilerServer will result in compilation errors.