evaluation

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

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 string, cluserType libsveltosv1alpha1.ClusterType,
	intervalInSecond uint, 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)

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 libsveltosv1alpha1.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