core

package
v0.0.0-...-03b3356 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPCheck

func HTTPCheck(action *v1.HTTPGetAction) (err error)

func NewHealthReconciler

func NewHealthReconciler(client client.Client) common.FeaturedReconciler

NewHealthReconciler creates an instance of common.Reconsiler

func NoErrors

func NoErrors(t assert.TestingT, err error, i ...interface{}) bool

NoErrors represents no errors

func RegularReconcile

func RegularReconcile(health *corev1.Health, err error) (result ctrl.Result)

Types

type FakeGroupedReconciler

type FakeGroupedReconciler struct {
	HasError bool
}

FakeGroupedReconciler is a fake GroupedReconciler which is for the test purpose

func (*FakeGroupedReconciler) GetGroupName

func (f *FakeGroupedReconciler) GetGroupName() string

GetGroupName returns the group name

func (*FakeGroupedReconciler) GetName

func (f *FakeGroupedReconciler) GetName() string

GetName returns the name

func (*FakeGroupedReconciler) Reconcile

Reconcile is fake reconcile process

func (*FakeGroupedReconciler) SetupWithManager

func (f *FakeGroupedReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager setups the reconciler

type FakeManager

type FakeManager struct {
	Client client.Client
	Scheme *runtime.Scheme
}

FakeManager is for the test purpose

func (*FakeManager) Add

Add is a fake method

func (*FakeManager) AddHealthzCheck

func (f *FakeManager) AddHealthzCheck(string, healthz.Checker) error

AddHealthzCheck is a fake method

func (*FakeManager) AddMetricsExtraHandler

func (f *FakeManager) AddMetricsExtraHandler(path string, handler http.Handler) error

AddMetricsExtraHandler is a fake method

func (*FakeManager) AddReadyzCheck

func (f *FakeManager) AddReadyzCheck(string, healthz.Checker) error

AddReadyzCheck is a fake method

func (*FakeManager) Elected

func (f *FakeManager) Elected() <-chan struct{}

Elected is a fake method

func (*FakeManager) GetAPIReader

func (f *FakeManager) GetAPIReader() client.Reader

GetAPIReader is a fake method

func (*FakeManager) GetCache

func (f *FakeManager) GetCache() cache.Cache

GetCache is a fake method

func (*FakeManager) GetClient

func (f *FakeManager) GetClient() client.Client

GetClient is a fake method

func (*FakeManager) GetConfig

func (f *FakeManager) GetConfig() *rest.Config

GetConfig is a fake method

func (*FakeManager) GetControllerOptions

func (f *FakeManager) GetControllerOptions() (spec v1alpha1.ControllerConfigurationSpec)

GetControllerOptions is a fake method

func (*FakeManager) GetEventRecorderFor

func (f *FakeManager) GetEventRecorderFor(name string) record.EventRecorder

GetEventRecorderFor is a fake method

func (*FakeManager) GetFieldIndexer

func (f *FakeManager) GetFieldIndexer() client.FieldIndexer

GetFieldIndexer is a fake method

func (*FakeManager) GetLogger

func (f *FakeManager) GetLogger() logr.Logger

GetLogger is a fake method

func (*FakeManager) GetRESTMapper

func (f *FakeManager) GetRESTMapper() meta.RESTMapper

GetRESTMapper is a fake method

func (*FakeManager) GetScheme

func (f *FakeManager) GetScheme() *runtime.Scheme

GetScheme is a fake method

func (*FakeManager) GetWebhookServer

func (f *FakeManager) GetWebhookServer() *webhook.Server

GetWebhookServer is a fake method

func (*FakeManager) SetFields

func (f *FakeManager) SetFields(interface{}) error

SetFields is a fake method

func (*FakeManager) Start

func (f *FakeManager) Start(ctx context.Context) error

Start is a fake method

type GroupReconciler

type GroupReconciler interface {
	reconcile.Reconciler
	// GetGroupName returns the group name
	GetGroupName() string
}

GroupReconciler is an interface with the group name a group means a set of some reconcilers that have a particular feature

type GroupedReconciler

type GroupedReconciler interface {
	NamedReconciler
	GroupReconciler

	SetupWithManager(mgr ctrl.Manager) error
}

GroupedReconciler is an interface for grouping reconciler purpose

type GroupedReconcilers

type GroupedReconcilers []GroupedReconciler

GroupedReconcilers is an alias of the slice of GroupedReconciler

func (GroupedReconcilers) Append

Append is a similar function to the original slice append

func (GroupedReconcilers) GetName

func (g GroupedReconcilers) GetName() (name string)

GetName returns the name of the group

func (GroupedReconcilers) SetupWithManager

func (g GroupedReconcilers) SetupWithManager(mgr manager.Manager) (err error)

SetupWithManager setups with a group of reconcilers

func (GroupedReconcilers) Size

func (g GroupedReconcilers) Size() int

Size returns the size of the slice

type HealthReconciler

type HealthReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

HealthReconciler reconciles a Tool object

func (*HealthReconciler) FeatureGate

func (r *HealthReconciler) FeatureGate() string

FeatureGate returns the feature gate

func (*HealthReconciler) FeatureGroup

func (r *HealthReconciler) FeatureGroup() string

FeatureGroup returns the feature group name

func (*HealthReconciler) FeatureName

func (r *HealthReconciler) FeatureName() string

FeatureName returns the feature name

func (*HealthReconciler) Reconcile

func (r *HealthReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*HealthReconciler) SetupWithManager

func (r *HealthReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type NamedReconciler

type NamedReconciler interface {
	reconcile.Reconciler
	// GetName returns the name of the reconciler
	GetName() string
}

NamedReconciler is an interface with allow a reconciler has a name

Jump to

Keyboard shortcuts

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