Documentation ¶
Index ¶
- Constants
- func FilterNamespaces(kubeClient kubernetes.Interface, filter string) []string
- func QueryClusterResources(kubeClient kubernetes.Interface, recorder *QueryRecorder, cfg *config.Config) error
- func QueryNSResources(kubeClient kubernetes.Interface, recorder *QueryRecorder, ns string, ...) error
- func Run(kubeClient kubernetes.Interface, cfg *config.Config) (errCount uint)
- func SerializeArrayObj(objs []interface{}, outpath string, file string) error
- func SerializeObj(obj interface{}, outpath string, file string) error
- func SerializeObjAppend(f *os.File, obj interface{}) error
- type ObjQuery
- type QueryRecorder
- type UntypedListQuery
- type UntypedQuery
Constants ¶
const ( // NSResourceLocation is the place under which namespaced API resources (pods, etc) are stored NSResourceLocation = "resources/ns" // ClusterResourceLocation is the place under which non-namespaced API resources (nodes, etc) are stored ClusterResourceLocation = "resources/cluster" // HostsLocation is the place under which host information (configz, healthz) is stored HostsLocation = "hosts" // MetaLocation is the place under which snapshot metadata (query times, config) is stored MetaLocation = "meta" )
const ( // PodLogsLocation is the location within the results tarball where pod // information is stored. PodLogsLocation = "podlogs" )
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, recorder *QueryRecorder, 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, recorder *QueryRecorder, 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 ¶
SerializeArrayObj will write out an array of object
func SerializeObj ¶
SerializeObj will write out an object
func SerializeObjAppend ¶
SerializeObjAppend will serialize an object and append to the end of file
Types ¶
type QueryRecorder ¶ added in v0.9.0
type QueryRecorder struct {
// contains filtered or unexported fields
}
func NewQueryRecorder ¶ added in v0.9.0
func NewQueryRecorder() *QueryRecorder
func (*QueryRecorder) DumpQueryData ¶ added in v0.9.0
func (q *QueryRecorder) DumpQueryData(filepath string) error
func (*QueryRecorder) RecordQuery ¶ added in v0.9.0
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