client

package
v2.30.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 19 modules, 120 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCluster

func SetCluster(cfg *rest.Config, clusterPath logicalcluster.Path) *rest.Config

SetCluster modifies the config host path to include the cluster endpoint.

Note: it is the caller responsibility to make a copy of the rest config.

Types

type Cache

type Cache[R any] interface {
	ClusterOrDie(clusterPath logicalcluster.Path) R
	Cluster(clusterPath logicalcluster.Path) (R, error)
}

Cache is a client factory that caches previous results.

func NewCache

func NewCache[R any](cfg *rest.Config, client *http.Client, constructor *Constructor[R]) Cache[R]

NewCache creates a new client factory cache using the given constructor.

type Constructor

type Constructor[R any] struct {
	NewForConfigAndClient func(*rest.Config, *http.Client) (R, error)
}

Constructor is a wrapper around a constructor method for the client of type R.

Jump to

Keyboard shortcuts

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