cache

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

cache package contains a RemoteResourceGetter interface for retrieving remote resource state without exposing the underline clients implementation. It also provide a concrete implementation that use a basic cache mechanism to avoid multiple calls to the remote api-server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedResourceGetter

type CachedResourceGetter struct {
	// contains filtered or unexported fields
}

func NewCachedResourceGetter

func NewCachedResourceGetter(mapper meta.RESTMapper, client dynamic.Interface) *CachedResourceGetter

func (*CachedResourceGetter) Get

Get implement RemoteResourceGetter interface

type RemoteResourceGetter

type RemoteResourceGetter interface {
	// Get return the remote status of ObjectMetadata resource or an error
	Get(context.Context, resource.ObjectMetadata) (*unstructured.Unstructured, error)
}

RemoteResourceGetter define the interface for a getter that can retrieve the remote status of a resource identified by its ObjectMetadata, it will return the remote unstructured reppresentation or nil if it wasn't found. An error will be returned only if is not for a not found resource.

Jump to

Keyboard shortcuts

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