discovery

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiClient

type ApiClient struct {
	DynClient dynamic.Interface
	ClientSet kubernetes.Interface
	Namespace string
}

func NewHelmClient

func NewHelmClient(kfcg KubConfigSetup, namespace string) (*ApiClient, error)

NewHelmClient holds a new helm client

type KubConfigSetup

type KubConfigSetup struct {
	Context        string
	KubeConfigFile string
	Namespace      string
}

KubConfigSetup holds user defined config

type MatchedResources

type MatchedResources struct {
	Gvr     map[bool][]schema.GroupVersionResource
	WantRes map[string][]string
}

func FetchedFilteredResources

func FetchedFilteredResources(client *ApiClient, wantResources map[string][]string) (namespaceResource, clusterResource *MatchedResources, err error)

FetchedFilteredResources figure out which resources we want to query based on given resources

func (MatchedResources) Query

func (m MatchedResources) Query(client *ApiClient, namespace string) (map[string][]byte, error)

Query will query given resources for both namespace or/and non-namespace

Jump to

Keyboard shortcuts

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