internal

package
v0.0.0-...-b00523d Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructClusterResourceTree

func ConstructClusterResourceTree(defaultClient client.Client, dcOptions client.DescribeClusterOptions) (*ClusterResourceNode, *HTTPError)

func ConstructMultiClusterTree

func ConstructMultiClusterTree(clusterClient cluster.Client, k8sConfigClient *api.Config) (*MultiClusterTreeNode, *HTTPError)

ConstructMultiClusterTree returns a tree representing the workload cluster discovered in the management cluster.

Types

type ClusterResourceNode

type ClusterResourceNode struct {
	Name        string                 `json:"name"`
	Kind        string                 `json:"kind"`
	Group       string                 `json:"group"`
	Version     string                 `json:"version"`
	Provider    string                 `json:"provider"`
	UID         string                 `json:"uid"`
	IsVirtual   bool                   `json:"isVirtual"`
	Collapsable bool                   `json:"collapsable"`
	Children    []*ClusterResourceNode `json:"children"`
}

type HTTPError

type HTTPError struct {
	Status  int
	Message string
}

func GetCustomResource

func GetCustomResource(runtimeClient ctrlclient.Client, kind string, apiVersion string, namespace string, name string) (*unstructured.Unstructured, *HTTPError)

func NewInternalError

func NewInternalError(err error) *HTTPError

func (*HTTPError) Error

func (e *HTTPError) Error() string

type MultiClusterTreeNode

type MultiClusterTreeNode struct {
	Name                   string                  `json:"name"`
	Namespace              string                  `json:"namespace"`
	Icon                   string                  `json:"icon"`
	InfrastructureProvider string                  `json:"infrastructureProvider"`
	IsManagement           bool                    `json:"isManagement"`
	Children               []*MultiClusterTreeNode `json:"children"`
}

Jump to

Keyboard shortcuts

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