commonclient

package
v0.20.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package commonclient provides version-independent wrappers over controller-runtime and client-go. This enables one codebase to work with multiple versions of controller-runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPClient

func GetHTTPClient(c cluster.Cluster) (*http.Client, error)

GetHTTPClient returns the http.Client associated with the Cluster

func NewDiscoveryRESTMapper

func NewDiscoveryRESTMapper(c *rest.Config, httpClient *http.Client) (meta.RESTMapper, error)

NewDiscoveryRESTMapper is a version-independent wrapper around creating a meta.RESTMapper It calls NewDynamicRESTMapper as of kubebuilder-declarative-pattern 0.17. Deprecated: prefer NewDynamicRESTMapper

func NewDynamicRESTMapper

func NewDynamicRESTMapper(c *rest.Config, httpClient *http.Client) (meta.RESTMapper, error)

NewDynamicRESTMapper is a version-independent wrapper around apiutil.NewDynamicRESTMapper

func SetMetricsBindAddress

func SetMetricsBindAddress(options *ctrl.Options, bindAddress string) error

SetMetricsBindAddress sets the metrics address on options independent of manager options version

func SourceKind

func SourceKind(cache cache.Cache, obj client.Object) source.Source

SourceKind is a version-indendenent abstraction over calling source.Kind

func SourceKindWithHandler

func SourceKindWithHandler(cache cache.Cache, obj client.Object, handler handler.TypedEventHandler[client.Object, reconcile.Request]) source.Source

SourceKind is a version-indendenent abstraction over calling source.Kind

Types

type EventHandler

type EventHandler = handler.EventHandler

Jump to

Keyboard shortcuts

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