evaluation

package
v0.51.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: Apache-2.0 Imports: 50 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetManager

func GetManager() *manager

GetManager returns the manager instance implementing the ClassifierInterface. Returns nil if manager has not been initialized yet

func InitializeManager

func InitializeManager(ctx context.Context, l logr.Logger, config *rest.Config, c client.Client,
	clusterNamespace, clusterName, version string, cluserType libsveltosv1beta1.ClusterType,
	intervalInSecond int64, sendReport bool)

InitializeManager initializes a manager implementing the ClassifierInterface

Types

type ClassifierInterface

type ClassifierInterface interface {
	// EvaluateClassifier requests a classifier to be
	// evaluated.
	// This method is idempotent. Invoking multiple times
	// on same instance, will queue Classifier to be evaluated
	// only once.
	// After an evaluation, a Classifier is automatically removed
	// from queue containing all Classifiers which requires evaluation.
	EvaluateClassifier(classifierName string)

	// EvaluateHealthCheck requests a healthCheck to be
	// evaluated.
	// This method is idempotent. Invoking multiple times
	// on same instance, will queue HealthCheck to be evaluated
	// only once.
	// After an evaluation, a HealthCheck is automatically removed
	// from queue containing all HealthChecks which requires evaluation.
	EvaluateHealthCheck(healthCheckName string)

	// EvaluateEventSource requests a eventSource to be
	// evaluated.
	// This method is idempotent. Invoking multiple times
	// on same instance, will queue EventSource to be evaluated
	// only once.
	// After an evaluation, an EventSource is automatically removed
	// from queue containing all EventSources which requires evaluation.
	EvaluateEventSource(eventSourceName string)

	// ReEvaluateResourceToWatch requests to rebuild the GVKs to watch.
	// This evaluation is done asynchronously when at least one request
	// to re-evaluate has been received
	ReEvaluateResourceToWatch()
}

type ReactToNotification

type ReactToNotification func(gvk *schema.GroupVersionKind, obj interface{})

type ResourceResult added in v0.22.0

type ResourceResult struct {
	// Resource identify a Kubernetes resource
	Resource *unstructured.Unstructured `json:"resource"`

	// Status is the current status of the resource
	Status libsveltosv1beta1.HealthStatus `json:"status"`

	// Message is an optional field.
	// +optional
	Message string `json:"message,omitempty"`
}

Jump to

Keyboard shortcuts

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