interfaces

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object interface {
	// The object needs to implement Meta Object interface from API
	// machinery. This interface is used for various Client operations
	// on Kubernetes objects.
	metav1.Object
	// The object needs to implement Runtime Object interface from API
	// machinery.
	runtime.Object
}

Object is the interface which all Kubernetes objects implements. This interface can be used to pass around any Kubernetes Object. This helps keep the functions more generic and less tied to the specific Objects.

type Reconcile

type Reconcile interface {
	// Getter function for reconcile client
	GetClient() client.Client
	// Getter function for reconcile Scheme
	GetScheme() *runtime.Scheme
	// Getter function for reconcile Scheme
	GetRecorder() record.EventRecorder
}

Reconcile is the interface for Reconcile object structs . This interface can be used to pass around Reconcile structs commonly used in Kubebuilder.

Note however that by default Reconcile structs generated using Kubebuilder do not implement this interface. Add following functions to implement this interface.

func (r *ReconcileObject) GetClient() client.Client { return r.client }
func (r *ReconcileObject) GetScheme() *runtime.Scheme { return r.scheme }
func (r *ReconcileObject) GetScheme() *runtime.Recorder { return r.recorder }

Jump to

Keyboard shortcuts

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