resource

package
v0.0.1-test Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package resource contains the definition of the Resource used by all trace printers, and the client used to get a Resource and its children.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Unstructured unstructured.Unstructured `json:"object"`
	Error        error                     `json:"error,omitempty"`
	Children     []*Resource               `json:"children,omitempty"`
}

Resource struct represents a kubernetes resource.

func GetResource

func GetResource(ctx context.Context, client client.Client, ref *v1.ObjectReference) *Resource

GetResource returns the requested Resource, setting any error as Resource.Error.

func (*Resource) GetCondition

func (r *Resource) GetCondition(ct xpv2.ConditionType) xpv2.Condition

GetCondition of this resource.

type ResourceList

type ResourceList struct {
	Items []*Resource `json:"items"`
	Error error       `json:"error,omitempty"`
}

ResourceList struct represents a list of kubernetes resources. revive:disable-next-line:exported For consistency with Resource.

func ListResources

func ListResources(ctx context.Context, c client.Client, ref *v1.ObjectReference) *ResourceList

ListResources returns requested Resources matching the references, setting any error as Resource.Error.

type TreeClient

type TreeClient interface {
	GetResourceTree(ctx context.Context, root *Resource) (*Resource, error)
}

TreeClient is the interface to get a Resource with all its children.

Directories

Path Synopsis
Package xpkg contains the client to get a Crossplane package with all its dependencies as a tree of Resource.
Package xpkg contains the client to get a Crossplane package with all its dependencies as a tree of Resource.
Package xrm contains the client to get a Crossplane resource with all its children as a tree of Resource.
Package xrm contains the client to get a Crossplane resource with all its children as a tree of Resource.

Jump to

Keyboard shortcuts

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