Documentation
¶
Index ¶
- func CreateEventFilterPage(rootDir string) error
- func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
- func GetPodReadyCondition(status v1.PodStatus) *v1.PodCondition
- func InspectResource(ctx context.Context, info *resource.Info, resourceCtx *resourceContext, ...) error
- func IsPodReady(pod *v1.Pod) bool
- func IsPodReadyConditionTrue(status v1.PodStatus) bool
- func NewCmdInspect(streams genericiooptions.IOStreams) *cobra.Command
- func NewResourceContext(serverResources sets.String) *resourceContext
- func PodRunningReady(p *v1.Pod) (bool, error)
- type InspectOptions
- type MultiSourceFileWriter
- type TextWriterSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEventFilterPage ¶
CreateEventFilterPage reads all events in rootDir recursively, produces a single file, and produces a webpage that can be viewed locally to filter the events.
func GetPodCondition ¶
func GetPodCondition(status *v1.PodStatus, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodConditionFromList ¶
func GetPodConditionFromList(conditions []v1.PodCondition, conditionType v1.PodConditionType) (int, *v1.PodCondition)
GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.
func GetPodReadyCondition ¶
func GetPodReadyCondition(status v1.PodStatus) *v1.PodCondition
Extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func InspectResource ¶
func InspectResource(ctx context.Context, info *resource.Info, resourceCtx *resourceContext, o *InspectOptions) error
InspectResource receives an object to gather debugging data for, and a context to keep track of already-seen objects when following related-object reference chains.
func IsPodReady ¶
func IsPodReady(pod *v1.Pod) bool
IsPodReady returns true if a pod is ready; false otherwise.
func IsPodReadyConditionTrue ¶
func IsPodReadyConditionTrue(status v1.PodStatus) bool
IsPodReady returns true if a pod is ready; false otherwise.
func NewCmdInspect ¶
func NewCmdInspect(streams genericiooptions.IOStreams) *cobra.Command
func NewResourceContext ¶
func PodRunningReady ¶
PodRunningReady checks whether pod p's phase is running and it has a ready condition of status true.
Types ¶
type InspectOptions ¶
type InspectOptions struct {
RESTConfig *rest.Config
// directory where all gathered data will be stored
DestDir string
genericiooptions.IOStreams
// contains filtered or unexported fields
}
func NewInspectOptions ¶
func NewInspectOptions(streams genericiooptions.IOStreams) *InspectOptions
func (*InspectOptions) Complete ¶
func (o *InspectOptions) Complete(args []string) error
func (*InspectOptions) Run ¶
func (o *InspectOptions) Run() error
func (*InspectOptions) RunContext ¶
func (o *InspectOptions) RunContext(ctx context.Context) error
func (*InspectOptions) Validate ¶
func (o *InspectOptions) Validate() error
type MultiSourceFileWriter ¶
type MultiSourceFileWriter struct {
// contains filtered or unexported fields
}
func NewMultiSourceWriter ¶
func NewMultiSourceWriter(printer printers.ResourcePrinter) *MultiSourceFileWriter
func (*MultiSourceFileWriter) WriteFromResource ¶
func (*MultiSourceFileWriter) WriteFromSource ¶
func (f *MultiSourceFileWriter) WriteFromSource(ctx context.Context, filepath string, source fileWriterSource) error
type TextWriterSource ¶
type TextWriterSource struct {
Text string
}
func (*TextWriterSource) Stream ¶
func (t *TextWriterSource) Stream(ctx context.Context) (io.ReadCloser, error)