discovery

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NSResourceLocation is the place under which namespaced API resources (pods, etc) are stored
	NSResourceLocation = "resources/ns"
	// NonNSResourceLocation is the place under which non-namespaced API resources (nodes, etc) are stored
	NonNSResourceLocation = "resources/non-ns"
	// HostsLocation is the place under which host information (configz, healthz) is stored
	HostsLocation = "hosts"
)
View Source
const (
	// PodsLocation is the location within the results tarball where pod
	// information is stored.
	PodsLocation = "pods"
)

Variables

This section is empty.

Functions

func FilterNamespaces

func FilterNamespaces(kubeClient kubernetes.Interface, filter string) []string

FilterNamespaces filter the list of namespaces according to the filter string

func QueryClusterResources

func QueryClusterResources(kubeClient kubernetes.Interface, cfg *config.Config) error

QueryClusterResources queries non-namespace resources in the cluster, writing them out to <resultsdir>/resources/non-ns/*.json TODO: Eliminate dependencies from config.Config and pass in data

func QueryNSResources

func QueryNSResources(kubeClient kubernetes.Interface, ns string, cfg *config.Config) error

QueryNSResources will query namespace-specific resources in the cluster, writing them out to <resultsdir>/resources/ns/<ns>/*.json TODO: Eliminate dependencies from config.Config and pass in data

func Run

func Run(kubeClient kubernetes.Interface, cfg *config.Config) (errCount uint)

Run is the main entrypoint for discovery

func SerializeArrayObj

func SerializeArrayObj(objs []interface{}, outpath string, file string) error

SerializeArrayObj will write out an array of object

func SerializeObj

func SerializeObj(obj interface{}, outpath string, file string) error

SerializeObj will write out an object

func SerializeObjAppend

func SerializeObjAppend(f *os.File, obj interface{}) error

SerializeObjAppend will serialize an object and append to the end of file

Types

type ObjQuery

type ObjQuery func() (runtime.Object, error)

ObjQuery is a query function that returns a kubernetes object

type UntypedListQuery

type UntypedListQuery func() ([]interface{}, error)

UntypedListQuery is a query function that return an untyped array of objs

type UntypedQuery

type UntypedQuery func() (interface{}, error)

UntypedQuery is a query function that return an untyped array of objs

Jump to

Keyboard shortcuts

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