utils

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package utils provides context helper functions and keys used by extension reconcile functions to access controller-runtime primitives (logger, client and scheme). Values are injected into the context by the extension controller before invoking user Reconcile logic. These helpers intentionally avoid introducing additional dependencies for extension authors.

Index

Constants

This section is empty.

Variables

View Source
var ClientKey = clientKeyType{}

ClientKey is the context key under which the controller-runtime client is stored.

View Source
var SchemeKey = schemeKeyType{}

SchemeKey is the context key under which the runtime.Scheme is stored.

Functions

func ClientFromContext

func ClientFromContext(ctx context.Context) (client.Client, error)

ClientFromContext returns a client from the context.

func LoggerFromContext

func LoggerFromContext(ctx context.Context) logr.Logger

LoggerFromContext returns a logger from the context.

func SchemeFromContext

func SchemeFromContext(ctx context.Context) (*runtime.Scheme, error)

SchemeFromContext returns a scheme from the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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