Documentation ¶
Index ¶
- Variables
- type AlertingNodeBackend
- func (a *AlertingNodeBackend) CanInstall(_ context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)deprecated
- func (a *AlertingNodeBackend) CancelUninstall(_ context.Context, _ *corev1.Reference) (*emptypb.Empty, error)
- func (a *AlertingNodeBackend) GetDefaultConfiguration(ctx context.Context, _ *emptypb.Empty) (*node.AlertingCapabilitySpec, error)
- func (a *AlertingNodeBackend) GetNodeConfiguration(ctx context.Context, node *corev1.Reference) (*node.AlertingCapabilitySpec, error)
- func (a *AlertingNodeBackend) Info(_ context.Context, _ *emptypb.Empty) (*capabilityv1.Details, error)
- func (a *AlertingNodeBackend) Initialize(kv CapabilitySpecKV, mgmtClient managementv1.ManagementClient, ...)
- func (a *AlertingNodeBackend) Install(ctx context.Context, req *capabilityv1.InstallRequest) (*capabilityv1.InstallResponse, error)
- func (a *AlertingNodeBackend) InstallerTemplate(_ context.Context, _ *emptypb.Empty) (*capabilityv1.InstallerTemplateResponse, error)deprecated
- func (a *AlertingNodeBackend) SetDefaultConfiguration(ctx context.Context, spec *node.AlertingCapabilitySpec) (*emptypb.Empty, error)
- func (a *AlertingNodeBackend) SetNodeConfiguration(ctx context.Context, req *node.NodeConfigRequest) (*emptypb.Empty, error)
- func (a *AlertingNodeBackend) Status(_ context.Context, req *corev1.Reference) (*capabilityv1.NodeCapabilityStatus, error)
- func (a *AlertingNodeBackend) Sync(ctx context.Context, req *node.AlertingCapabilityConfig) (*node.SyncResponse, error)
- func (a *AlertingNodeBackend) Uninstall(ctx context.Context, req *capabilityv1.UninstallRequest) (*emptypb.Empty, error)
- func (a *AlertingNodeBackend) UninstallStatus(_ context.Context, _ *corev1.Reference) (*corev1.TaskStatus, error)
- type CapabilitySpecKV
Constants ¶
This section is empty.
Variables ¶
var FallbackDefaultNodeSpec = &node.AlertingCapabilitySpec{ RuleDiscovery: &node.RuleDiscoverySpec{ Enabled: true, }, }
Functions ¶
This section is empty.
Types ¶
type AlertingNodeBackend ¶
type AlertingNodeBackend struct { util.Initializer capabilityv1.UnsafeBackendServer node.UnsafeNodeAlertingCapabilityServer node.UnsafeAlertingNodeConfigurationServer // contains filtered or unexported fields }
func NewAlertingNodeBackend ¶
func NewAlertingNodeBackend( lg *zap.SugaredLogger, ) *AlertingNodeBackend
func (*AlertingNodeBackend) CanInstall
deprecated
func (*AlertingNodeBackend) CancelUninstall ¶
func (a *AlertingNodeBackend) CancelUninstall(_ context.Context, _ *corev1.Reference) (*emptypb.Empty, error)
Cancels an uninstall task for the given cluster, if it is still pending.
func (*AlertingNodeBackend) GetDefaultConfiguration ¶
func (a *AlertingNodeBackend) GetDefaultConfiguration(ctx context.Context, _ *emptypb.Empty) (*node.AlertingCapabilitySpec, error)
func (*AlertingNodeBackend) GetNodeConfiguration ¶
func (a *AlertingNodeBackend) GetNodeConfiguration(ctx context.Context, node *corev1.Reference) (*node.AlertingCapabilitySpec, error)
func (*AlertingNodeBackend) Info ¶
func (a *AlertingNodeBackend) Info(_ context.Context, _ *emptypb.Empty) (*capabilityv1.Details, error)
Returns info about the backend, including capability name
func (*AlertingNodeBackend) Initialize ¶
func (a *AlertingNodeBackend) Initialize( kv CapabilitySpecKV, mgmtClient managementv1.ManagementClient, nodeManagerClient capabilityv1.NodeManagerClient, storageBackend storage.Backend, )
func (*AlertingNodeBackend) Install ¶
func (a *AlertingNodeBackend) Install(ctx context.Context, req *capabilityv1.InstallRequest) (*capabilityv1.InstallResponse, error)
Installs the capability on a cluster.
func (*AlertingNodeBackend) InstallerTemplate
deprecated
func (a *AlertingNodeBackend) InstallerTemplate(_ context.Context, _ *emptypb.Empty) (*capabilityv1.InstallerTemplateResponse, error)
Deprecated: Do not use. Returns a go template string which will generate a shell command used to install the capability. This will be displayed to the user in the UI. See InstallerTemplateSpec above for the available template fields.
func (*AlertingNodeBackend) SetDefaultConfiguration ¶
func (a *AlertingNodeBackend) SetDefaultConfiguration(ctx context.Context, spec *node.AlertingCapabilitySpec) (*emptypb.Empty, error)
func (*AlertingNodeBackend) SetNodeConfiguration ¶
func (a *AlertingNodeBackend) SetNodeConfiguration(ctx context.Context, req *node.NodeConfigRequest) (*emptypb.Empty, error)
func (*AlertingNodeBackend) Status ¶
func (a *AlertingNodeBackend) Status(_ context.Context, req *corev1.Reference) (*capabilityv1.NodeCapabilityStatus, error)
Returns common runtime config info for this capability from a specific cluster (node).
func (*AlertingNodeBackend) Sync ¶
func (a *AlertingNodeBackend) Sync(ctx context.Context, req *node.AlertingCapabilityConfig) (*node.SyncResponse, error)
func (*AlertingNodeBackend) Uninstall ¶
func (a *AlertingNodeBackend) Uninstall(ctx context.Context, req *capabilityv1.UninstallRequest) (*emptypb.Empty, error)
Requests the backend to clean up any resources it owns and prepare for uninstallation. This process is asynchronous. The status of the operation can be queried using the UninstallStatus method, or canceled using the CancelUninstall method.
func (*AlertingNodeBackend) UninstallStatus ¶
func (a *AlertingNodeBackend) UninstallStatus(_ context.Context, _ *corev1.Reference) (*corev1.TaskStatus, error)
Gets the status of the uninstall task for the given cluster.
type CapabilitySpecKV ¶
type CapabilitySpecKV struct { DefaultCapabilitySpec storage.ValueStoreT[*node.AlertingCapabilitySpec] NodeCapabilitySpecs storage.KeyValueStoreT[*node.AlertingCapabilitySpec] }