node_backend

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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The "default" default node spec. Exported for testing purposes.
	FallbackDefaultNodeSpec atomic.Pointer[node.AlertingCapabilitySpec]
)

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 *slog.Logger,
) *AlertingNodeBackend

func (*AlertingNodeBackend) CanInstall deprecated

Deprecated: Do not use. Returns an error if installing the capability would fail.

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

Returns info about the backend, including capability name

func (*AlertingNodeBackend) Initialize

func (a *AlertingNodeBackend) Initialize(
	kv CapabilitySpecKV,
	mgmtClient managementv1.ManagementClient,
	nodeManagerClient streamext.StreamDelegate[agent.ClientSet],
	storageBackend storage.Backend,
)

func (*AlertingNodeBackend) Install

Installs the capability on a cluster.

func (*AlertingNodeBackend) InstallerTemplate deprecated

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

Returns common runtime config info for this capability from a specific cluster (node).

func (*AlertingNodeBackend) Sync

func (*AlertingNodeBackend) Uninstall

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]
}

Jump to

Keyboard shortcuts

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