Documentation ¶
Index ¶
- Variables
- func ListBadDefaultStatuses() []string
- func ListCapabilityStatuses(capabilityName string) map[string][]health.ConditionStatus
- func RegisterCapabilityStatus(capabilityName, condName string, availableStatuses []health.ConditionStatus)
- func Scheme(ctx context.Context) meta.Scheme
- func UseCachingProvider(c caching.CachingProvider[proto.Message])
- type Plugin
- func (p *Plugin) Components() []server.ServerComponent
- func (p *Plugin) ConfigureCluster(ctx context.Context, configuration *alertops.ClusterConfiguration) (*emptypb.Empty, error)
- func (p *Plugin) ConfigureRoutes(router *gin.Engine)
- func (p *Plugin) GetClusterConfiguration(ctx context.Context, _ *emptypb.Empty) (*alertops.ClusterConfiguration, error)
- func (p *Plugin) GetClusterStatus(ctx context.Context, _ *emptypb.Empty) (*alertops.InstallStatus, error)
- func (p *Plugin) Info(ctx context.Context, _ *emptypb.Empty) (*alertops.ComponentInfo, error)
- func (p *Plugin) InstallCluster(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
- func (p *Plugin) StreamServers() []streamext.Server
- func (p *Plugin) SyncConfig(server alertops.ConfigReconciler_SyncConfigServer) error
- func (p *Plugin) UninstallCluster(ctx context.Context, request *alertops.UninstallRequest) (*emptypb.Empty, error)
- func (p *Plugin) UseAPIExtensions(intf system.ExtensionClientInterface)
- func (p *Plugin) UseKeyValueStore(client system.KeyValueStoreClient)
- func (p *Plugin) UseManagementAPI(client managementv1.ManagementClient)
- func (p *Plugin) UseStreamClient(cc grpc.ClientConnInterface)
- type RemoteInfo
- type SyncController
- func (s *SyncController) AddRemoteInfo(LifecycleUuid string, info RemoteInfo)
- func (s *SyncController) AddSyncPusher(LifecycleUuid string, pusher chan *alertops.SyncRequest)
- func (s *SyncController) ListRemoteInfo() map[string]RemoteInfo
- func (s *SyncController) PushOne(lifecycleId string, payload *syncPayload)
- func (s *SyncController) PushSyncReq(payload *syncPayload)
- func (s *SyncController) RemoveRemoteInfo(LifecycleUuid string)
- func (s *SyncController) RemoveSyncPusher(LifecycleUuid string)
- type SyncMetricsExporter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SyncInterval = time.Minute * 1 ForceSyncInterval = time.Minute * 15 )
View Source
var ( DefaultDisconnectAlarm = func(clusterId string) *alertingv1.AlertCondition { return &alertingv1.AlertCondition{ Name: "agent-disconnect", Description: "Alert when the downstream agent disconnects from the opni upstream", Labels: []string{"agent-disconnect", "opni", "_default"}, Severity: alertingv1.OpniSeverity_Critical, AlertType: &alertingv1.AlertTypeDetails{ Type: &alertingv1.AlertTypeDetails_System{ System: &alertingv1.AlertConditionSystem{ ClusterId: &corev1.Reference{Id: clusterId}, Timeout: durationpb.New(10 * time.Minute), }, }, }, } } DefaultCapabilityHealthAlarm = func(clusterId string) *alertingv1.AlertCondition { return &alertingv1.AlertCondition{ Name: "agent-capability-unhealthy", Description: "Alert when some downstream agent capability becomes unhealthy", Labels: []string{"agent-capability-health", "opni", "_default"}, Severity: alertingv1.OpniSeverity_Critical, AlertType: &alertingv1.AlertTypeDetails{ Type: &alertingv1.AlertTypeDetails_DownstreamCapability{ DownstreamCapability: &alertingv1.AlertConditionDownstreamCapability{ ClusterId: &corev1.Reference{Id: clusterId}, CapabilityState: ListBadDefaultStatuses(), For: durationpb.New(10 * time.Minute), }, }, }, } } )
View Source
var RegisteredCapabilityStatuses = map[string]map[string][]health.ConditionStatus{}
Functions ¶
func ListBadDefaultStatuses ¶ added in v0.8.0
func ListBadDefaultStatuses() []string
func ListCapabilityStatuses ¶ added in v0.8.0
func ListCapabilityStatuses(capabilityName string) map[string][]health.ConditionStatus
func RegisterCapabilityStatus ¶ added in v0.8.0
func RegisterCapabilityStatus(capabilityName, condName string, availableStatuses []health.ConditionStatus)
func UseCachingProvider ¶ added in v0.9.2
func UseCachingProvider(c caching.CachingProvider[proto.Message])
Types ¶
type Plugin ¶
type Plugin struct { alertops.UnsafeAlertingAdminServer alertops.ConfigReconcilerServer system.UnimplementedSystemPluginClient collector.CollectorServer *notifications.NotificationServerComponent *endpoints.EndpointServerComponent *alarms.AlarmServerComponent // contains filtered or unexported fields }
func (*Plugin) Components ¶ added in v0.10.0
func (p *Plugin) Components() []server.ServerComponent
func (*Plugin) ConfigureCluster ¶ added in v0.11.0
func (*Plugin) ConfigureRoutes ¶ added in v0.12.0
func (*Plugin) GetClusterConfiguration ¶ added in v0.11.0
func (*Plugin) GetClusterStatus ¶ added in v0.11.0
func (*Plugin) InstallCluster ¶ added in v0.11.0
func (*Plugin) StreamServers ¶ added in v0.11.0
func (*Plugin) SyncConfig ¶ added in v0.11.1
func (p *Plugin) SyncConfig(server alertops.ConfigReconciler_SyncConfigServer) error
func (*Plugin) UninstallCluster ¶ added in v0.11.0
func (*Plugin) UseAPIExtensions ¶
func (p *Plugin) UseAPIExtensions(intf system.ExtensionClientInterface)
func (*Plugin) UseKeyValueStore ¶ added in v0.6.0
func (p *Plugin) UseKeyValueStore(client system.KeyValueStoreClient)
UseKeyValueStore Alerting Condition & Alert Endpoints are stored in K,V stores
func (*Plugin) UseManagementAPI ¶
func (p *Plugin) UseManagementAPI(client managementv1.ManagementClient)
func (*Plugin) UseStreamClient ¶ added in v0.12.0
func (p *Plugin) UseStreamClient(cc grpc.ClientConnInterface)
type RemoteInfo ¶ added in v0.11.1
type SyncController ¶ added in v0.11.0
type SyncController struct {
// contains filtered or unexported fields
}
func NewSyncController ¶ added in v0.11.0
func NewSyncController(lg *slog.Logger) SyncController
func (*SyncController) AddRemoteInfo ¶ added in v0.11.1
func (s *SyncController) AddRemoteInfo(LifecycleUuid string, info RemoteInfo)
func (*SyncController) AddSyncPusher ¶ added in v0.11.0
func (s *SyncController) AddSyncPusher(LifecycleUuid string, pusher chan *alertops.SyncRequest)
func (*SyncController) ListRemoteInfo ¶ added in v0.11.1
func (s *SyncController) ListRemoteInfo() map[string]RemoteInfo
func (*SyncController) PushOne ¶ added in v0.11.1
func (s *SyncController) PushOne(lifecycleId string, payload *syncPayload)
func (*SyncController) PushSyncReq ¶ added in v0.11.0
func (s *SyncController) PushSyncReq(payload *syncPayload)
func (*SyncController) RemoveRemoteInfo ¶ added in v0.11.1
func (s *SyncController) RemoveRemoteInfo(LifecycleUuid string)
func (*SyncController) RemoveSyncPusher ¶ added in v0.11.0
func (s *SyncController) RemoveSyncPusher(LifecycleUuid string)
type SyncMetricsExporter ¶ added in v0.11.0
type SyncMetricsExporter struct {
// contains filtered or unexported fields
}
func NewSyncMetricsExporter ¶ added in v0.11.0
func NewSyncMetricsExporter() *SyncMetricsExporter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.