reconciler

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// KubeClientSet allows us to talk to the k8s for core APIs
	KubeClientSet kubernetes.Interface

	// ServingClientSet allows us to configure Serving objects
	KnativeServingClientSet clientset.Interface

	// EventingClientSet allows us to configure Eventing objects
	KnativeEventingClientSet clientset.Interface

	// DynamicClientSet allows us to configure pluggable Build objects
	DynamicClientSet dynamic.Interface

	// ConfigMapWatcher allows us to watch for ConfigMap changes.
	ConfigMapWatcher configmap.Watcher

	// Recorder is an event recorder for recording Event resources to the
	// Kubernetes API.
	Recorder record.EventRecorder

	// StatsReporter reports reconciler's metrics.
	StatsReporter StatsReporter

	// Sugared logger is easier to use but is not as performant as the
	// raw logger. In performance critical paths, call logger.Desugar()
	// and use the returned raw logger instead. In addition to the
	// performance benefits, raw logger also preserves type-safety at
	// the expense of slightly greater verbosity.
	Logger *zap.SugaredLogger
}

Base implements the core controller logic, given a Reconciler.

func NewBase

func NewBase(ctx context.Context, controllerAgentName string, cmw configmap.Watcher) *Base

NewBase instantiates a new instance of Base implementing the common & boilerplate code between our reconcilers.

type StatsReporter

type StatsReporter interface {
	// ReportKnativeServingChange reports the count of KnativeServing changes.
	ReportKnativeservingChange(knativeservingResourceName, change string) error
}

StatsReporter defines the interface for sending metrics.

func NewStatsReporter

func NewStatsReporter(reconcilerName string) (StatsReporter, error)

NewStatsReporter creates a reporter that collects and reports metrics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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