resourceclient

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package resourceclient provides utilities for retrieving arbitrary K8s resources from the APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(apiVersion string, kind string, name string, namespace string) (*unstructured.Unstructured, error)
}

Client provides methods for retrieving arbitrary Kubernetes resources, returned as generalised metav1.Object, which can be converted to concrete types, and allows for retrieving common and shared data (namespaces, names etc.)

type UnstructuredClient

type UnstructuredClient struct {
	Dynamic dynamic.Interface
}

UnstructuredClient is an implementation of the arbitrary resource client that uses a dynamic Kubernetes interface, retrieving unstructured k8s objects and converting them to metav1.Object

func (*UnstructuredClient) Get

func (u *UnstructuredClient) Get(apiVersion string, kind string, name string, namespace string) (*unstructured.Unstructured, error)

Get takes descriptors of a Kubernetes object (api version, kind, name, namespace) and fetches the matching object, returning it as an unstructured Kubernetes resource

Jump to

Keyboard shortcuts

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