resource

package
v0.2.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Name       string `json:"name"`
	Namespace  string `json:"namespace"`
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Cluster    string `json:"cluster"`
}

type ResourceConfig

type ResourceConfig struct {
	Verbose bool `json:"verbose"`
}

type ResourceManager

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

func NewResourceManager

func NewResourceManager(config *ResourceConfig) *ResourceManager

NewResourceManager returns a new ResourceManager

func (*ResourceManager) ConvertResourceGraphToMap

func (*ResourceManager) GetResource

GetResource returns the unstructured cluster object for a given cluster

func (*ResourceManager) GetResourceRelationship

GetResourceRelationship returns a full graph that contains all the resources that are related to obj

func (*ResourceManager) GetResourceSummary added in v0.2.12

func (r *ResourceManager) GetResourceSummary(ctx context.Context, client *multicluster.MultiClusterClient, res *Resource) (*ResourceSummary, error)

GetResourceSummary returns the unstructured cluster object summary for a given cluster. Possibly will add more metrics to it in the future.

func (*ResourceManager) GetTopologyForResource

func (r *ResourceManager) GetTopologyForResource(ctx context.Context, client *multicluster.MultiClusterClient, res *Resource) (map[string]ResourceTopology, error)

GetTopologyForResource returns a map that describes topology for a given cluster

func (*ResourceManager) GetYAMLForResource

func (r *ResourceManager) GetYAMLForResource(ctx context.Context, client *multicluster.MultiClusterClient, res *Resource) ([]byte, error)

GetYAMLForResource returns the yaml byte array for a given cluster

type ResourceSummary added in v0.2.12

type ResourceSummary struct {
	Resource          Resource    `json:"resource"`
	CreationTimestamp metav1.Time `json:"creationTimestamp"`
	ResourceVersion   string      `json:"resourceVersion"`
	UID               types.UID   `json:"uid"`
}

type ResourceTopology

type ResourceTopology struct {
	Identifier string   `json:"identifier"`
	Parents    []string `json:"parents"`
	Children   []string `json:"children"`
}

type UniResource added in v0.2.9

type UniResource struct {
	Cluster string         `json:"cluster"`
	Object  runtime.Object `json:"object"`
}

type UniResourceList added in v0.2.9

type UniResourceList struct {
	metav1.TypeMeta
	Items       []UniResource `json:"items"`
	Total       int           `json:"total"`
	CurrentPage int           `json:"currentPage"`
	PageSize    int           `json:"pageSize"`
}

Jump to

Keyboard shortcuts

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