Documentation ¶
Index ¶
- Variables
- func FiltersToArgs(f map[string][]string) filters.Args
- func GetUseDefaults(tasks []LifecycleTask) bool
- type BytesProducer
- type BytesScrubber
- type ChannelMetaOptions
- type Collect
- type ContainerListOptions
- type CoreHTTPRequestOptions
- type CoreHostnameOptions
- type CoreLoadavgOptions
- type CoreReadFileOptions
- type CoreRunCommandOptions
- type CoreUptimeOptions
- type CustomerMetaOptions
- type Doc
- type DockerContainerCpOptions
- type DockerContainerExecOptions
- type DockerContainerInspectOptions
- type DockerContainerLogsOptions
- type DockerContainerLsOptions
- type DockerContainerRunOptions
- type DockerImageLsOptions
- type DockerInfoOptions
- type DockerNodeLsOptions
- type DockerServiceLogsOptions
- type DockerServiceLsOptions
- type DockerServicePsOptions
- type DockerStackServiceLogsOptions
- type DockerStackServiceLsOptions
- type DockerStackServicePsOptions
- type DockerStackTaskLogsOptions
- type DockerTaskLogsOptions
- type DockerTaskLsOptions
- type DockerVersionOptions
- type GenerateOptions
- type GlobalRedactionOptions
- type ImageListOptions
- type JournaldLogsOptions
- type KubernetesAPIVersionsOptions
- type KubernetesClusterInfoOptions
- type KubernetesContainerCpOptions
- type KubernetesLogsOptions
- type KubernetesResourceListOptions
- type KubernetesVersionOptions
- type LabelsFilter
- type LifecycleTask
- type MessageOptions
- type NodeListOptions
- type NotesOptions
- type Planner
- type Plugin
- type PodLogOptions
- type PromptOptions
- type Result
- type RetracedAPIClientOptions
- type RetracedEventsOptions
- type Scrub
- type ServiceListOptions
- type Spec
- type SpecShared
- type StreamProducer
- type StreamsProducer
- type StructuredProducer
- type SupportBundleVersionOptions
- type Task
- type TaskListOptions
- type UploadOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLifecycleTasks = []LifecycleTask{ { Message: &MessageOptions{"Starting support bundle collection..."}, }, { Notes: &NotesOptions{ Prompt: "Enter a note: ", }, }, { Generate: &GenerateOptions{UseDefaults: true}, }, { Upload: &UploadOptions{}, }, { Message: &MessageOptions{"Upload complete! Check the analyzed bundle for more information"}, }, }
View Source
var GenerateOnlyLifecycleTasks = []LifecycleTask{ { Message: &MessageOptions{"Starting support bundle collection..."}, }, { Generate: &GenerateOptions{UseDefaults: true}, }, { Message: &MessageOptions{"Generation complete!"}, }, }
Functions ¶
func GetUseDefaults ¶
func GetUseDefaults(tasks []LifecycleTask) bool
Types ¶
type BytesScrubber ¶
type ChannelMetaOptions ¶ added in v0.23.0
type ChannelMetaOptions struct { ChannelID string `json:"channel_id,omitempty"` ChannelName string `json:"channel_name,omitempty"` }
meta.channel
type Collect ¶ added in v0.19.0
type Collect struct {
V1 []Spec `json:"v1,omitempty"`
}
Collect is the top level collect object
type ContainerListOptions ¶
type ContainerListOptions struct { Quiet bool Size bool All bool Latest bool Since string Before string Limit int Filters map[string][]string }
func (*ContainerListOptions) ToDockerContainerListOptions ¶
func (opts *ContainerListOptions) ToDockerContainerListOptions() dockertypes.ContainerListOptions
type CoreHTTPRequestOptions ¶
type CoreHostnameOptions ¶
type CoreHostnameOptions struct {
}type CoreLoadavgOptions ¶
type CoreLoadavgOptions struct { Template string `json:"template"` }
type CoreReadFileOptions ¶
type CoreReadFileOptions struct { Filepath string `json:"filepath"` }
type CoreRunCommandOptions ¶
type CoreUptimeOptions ¶
type CoreUptimeOptions struct { Template string `json:"template"` }
type CustomerMetaOptions ¶
type CustomerMetaOptions struct { CustomerID string `json:"customer_id,omitempty"` InstallationID string `json:"installation_id,omitempty"` CustomerName string `json:"customer_name,omitempty"` }
meta.customer - deprecated
type Doc ¶
type Doc struct { Collect Collect `json:"collect,omitempty"` Lifecycle []LifecycleTask `json:"lifecycle,omitempty"` }
func (*Doc) UnmarshalJSON ¶ added in v0.19.0
type DockerContainerExecOptions ¶
type DockerContainerExecOptions struct { Container string `json:"container,omitempty"` Labels []string `json:"labels,omitempty"` ExecConfig dockertypes.ExecConfig `json:"exec_config"` }
type DockerContainerInspectOptions ¶
type DockerContainerInspectOptions struct { Container string `json:"container,omitempty"` ContainerListOptions *ContainerListOptions `json:"container_list_options,omitempty"` }
type DockerContainerLogsOptions ¶
type DockerContainerLogsOptions struct { Container string `json:"container,omitempty"` ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"` ContainerListOptions *ContainerListOptions `json:"container_list_options,omitempty"` }
type DockerContainerLsOptions ¶
type DockerContainerLsOptions struct { ContainerListOptions `json:",inline,omitempty"` }
type DockerContainerRunOptions ¶
type DockerContainerRunOptions struct { ContainerCreateConfig dockertypes.ContainerCreateConfig `json:"container_create_config"` EnablePull bool `json:"enable_pull,omitempty"` }
type DockerImageLsOptions ¶
type DockerImageLsOptions struct { ImageListOptions `json:",inline,omitempty"` }
type DockerInfoOptions ¶
type DockerInfoOptions struct {
}type DockerNodeLsOptions ¶
type DockerNodeLsOptions struct { NodeListOptions `json:",inline,omitempty"` }
type DockerServiceLogsOptions ¶
type DockerServiceLogsOptions struct { Service string `json:"service,omitempty"` ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"` ServiceListOptions *ServiceListOptions `json:"service_list_options,omitempty"` }
type DockerServiceLsOptions ¶
type DockerServiceLsOptions struct { ServiceListOptions `json:",inline,omitempty"` }
type DockerServicePsOptions ¶
type DockerServicePsOptions struct { DockerTaskLsOptions `json:",inline,omitempty"` }
type DockerStackServiceLogsOptions ¶
type DockerStackServiceLogsOptions struct { LabelsFilter `json:",inline,omitempty"` Namespace string `json:"namespace"` ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"` DockerServiceLsOptions *DockerServiceLsOptions `json:"service_list_options,omitempty"` }
type DockerStackServiceLsOptions ¶
type DockerStackServiceLsOptions struct { Namespace string `json:"namespace"` DockerServiceLsOptions *DockerServiceLsOptions `json:"service_list_options,omitempty"` }
type DockerStackServicePsOptions ¶
type DockerStackServicePsOptions struct { Namespace string `json:"namespace"` DockerServicePsOptions *DockerServicePsOptions `json:"task_list_options,omitempty"` }
type DockerStackTaskLogsOptions ¶
type DockerStackTaskLogsOptions struct { LabelsFilter `json:",inline,omitempty"` Namespace string `json:"namespace"` ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"` DockerServicePsOptions *DockerServicePsOptions `json:"task_list_options,omitempty"` }
type DockerTaskLogsOptions ¶
type DockerTaskLogsOptions struct { ID string `json:"id,omitempty"` ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"` TaskListOptions *TaskListOptions `json:"task_list_options,omitempty"` }
type DockerTaskLsOptions ¶
type DockerTaskLsOptions struct { TaskListOptions `json:",inline,omitempty"` }
type DockerVersionOptions ¶
type DockerVersionOptions struct {
}type GenerateOptions ¶
type GenerateOptions struct {
UseDefaults bool `json:"use_defaults,omitempty"`
}
type GlobalRedactionOptions ¶ added in v0.22.0
type GlobalRedactionOptions struct { Scrubs []Scrub `json:"scrubs,omitempty"` }
meta.redact
type ImageListOptions ¶
func (*ImageListOptions) ToDockerImageListOptions ¶
func (opts *ImageListOptions) ToDockerImageListOptions() dockertypes.ImageListOptions
type JournaldLogsOptions ¶
type KubernetesAPIVersionsOptions ¶
type KubernetesAPIVersionsOptions struct {
}type KubernetesClusterInfoOptions ¶
type KubernetesClusterInfoOptions struct {
}type KubernetesLogsOptions ¶
type KubernetesLogsOptions struct { Pod string `json:"pod,omitempty"` Namespace string `json:"namespace,omitempty"` PodLogOptions *PodLogOptions `json:"pod_log_options,omitempty"` ListOptions *metav1.ListOptions `json:"list_options,omitempty"` }
type KubernetesResourceListOptions ¶
type KubernetesResourceListOptions struct { Kind string `json:"kind"` GroupVersion string `json:"group_version,omitempty"` Namespace string `json:"namespace,omitempty"` ListOptions *metav1.ListOptions `json:"resource_list_options,omitempty"` }
type KubernetesVersionOptions ¶
type KubernetesVersionOptions struct {
}type LabelsFilter ¶
type LifecycleTask ¶
type LifecycleTask struct { Generate *GenerateOptions `json:"generate,omitempty"` Message *MessageOptions `json:"message,omitempty"` Notes *NotesOptions `json:"notes,omitempty"` Upload *UploadOptions `json:"upload,omitempty"` }
type MessageOptions ¶
type MessageOptions struct {
Contents string `json:"contents,omitempty"`
}
type NodeListOptions ¶
func (*NodeListOptions) ToDockerNodeListOptions ¶
func (opts *NodeListOptions) ToDockerNodeListOptions() dockertypes.NodeListOptions
type NotesOptions ¶
type NotesOptions struct {
Prompt string `json:"prompt,omitempty"`
}
type PodLogOptions ¶
type PodLogOptions struct { metav1.TypeMeta `json:",inline"` // The container for which to stream logs. Defaults to only container if there is one container in the pod. // +optional Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` // Follow the log stream of the pod. Defaults to false. // +optional Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` // Return previous terminated container logs. Defaults to false. // +optional Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` // A relative time in seconds before the current time from which to show logs. If this value // precedes the time a pod was started, only logs since the pod start will be returned. // If this value is in the future, no logs will be returned. // Only one of sinceSeconds or sinceTime may be specified. // +optional SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` // An RFC3339 timestamp from which to show logs. If this value // precedes the time a pod was started, only logs since the pod start will be returned. // If this value is in the future, no logs will be returned. // Only one of sinceSeconds or sinceTime may be specified. // +optional SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line // of log output. Defaults to false. // +optional Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` // If set, the number of lines from the end of the logs to show. If not specified, // logs are shown from the creation of the container or sinceSeconds or sinceTime // +optional TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` // If set, the number of bytes to read from the server before terminating the // log output. This may not display a complete final line of logging, and may return // slightly more or slightly less than the specified limit. // +optional LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` }
PodLogOptions is the query options for a Pod's logs REST call.
type PromptOptions ¶
type Result ¶
type Result struct { // The subpath within the bundle Path string `json:"path"` Format string `json:"format"` Size int64 `json:"size"` Spec Spec `json:"spec"` Error error `json:"error,omitempty"` }
Result represents a single file within a support bundle or the failure to collect the data for a single file within a support bundle. A Result may have both a Pathname and an Error if the file written was corrupted or incomplete.
func (*Result) MarshalJSON ¶
MarshalJSON .Error will be {} if it has no exported fields, so replace it with a string.
func (*Result) UnmarshalJSON ¶
UnmarshalJSON will convert .Error from string to error
type RetracedEventsOptions ¶
type RetracedEventsOptions struct { RetracedAPIClientOptions `json:",inline"` Mask *retraced.EventNodeMask `json:"mask,omitempty"` Query *retraced.StructuredQuery `json:"query,omitempty"` }
type ServiceListOptions ¶
func (*ServiceListOptions) ToDockerServiceListOptions ¶
func (opts *ServiceListOptions) ToDockerServiceListOptions() dockertypes.ServiceListOptions
type Spec ¶
type Spec struct { SupportBundleVersion *SupportBundleVersionOptions `json:"version,omitempty"` CustomerMeta *CustomerMetaOptions `json:"meta.customer,omitempty"` // deprecated ChannelMeta *ChannelMetaOptions `json:"meta.channel,omitempty"` // undocumented hack to add global redaction GlobalRedaction *GlobalRedactionOptions `json:"meta.redact,omitempty"` // CoreHostname gets the hostname of the machine on which we're running CoreHostname *CoreHostnameOptions `json:"os.hostname,omitempty"` CoreHTTPRequest *CoreHTTPRequestOptions `json:"os.http-request,omitempty"` CoreLoadavg *CoreLoadavgOptions `json:"os.loadavg,omitempty"` CoreReadFile *CoreReadFileOptions `json:"os.read-file,omitempty"` CoreRunCommand *CoreRunCommandOptions `json:"os.run-command,omitempty"` CoreUptime *CoreUptimeOptions `json:"os.uptime,omitempty"` JournaldLogs *JournaldLogsOptions `json:"journald.logs,omitempty"` // DockerContainerCp copies a file from a running docker container DockerContainerCp *DockerContainerCpOptions `json:"docker.container-cp,omitempty"` DockerContainerExec *DockerContainerExecOptions `json:"docker.container-exec,omitempty"` DockerContainerInspect *DockerContainerInspectOptions `json:"docker.container-inspect,omitempty"` DockerContainerLogs *DockerContainerLogsOptions `json:"docker.container-logs,omitempty"` DockerContainerLs *DockerContainerLsOptions `json:"docker.container-ls,omitempty"` DockerContainerRun *DockerContainerRunOptions `json:"docker.container-run,omitempty"` DockerExec *DockerContainerExecOptions `json:"docker.exec,omitempty"` // canonical: docker.container-exec DockerImageLs *DockerImageLsOptions `json:"docker.image-ls,omitempty"` DockerImages *DockerImageLsOptions `json:"docker.images,omitempty"` // canonical: docker.image-ls DockerInfo *DockerInfoOptions `json:"docker.info,omitempty"` // TODO: docker.inspect DockerLogs *DockerContainerLogsOptions `json:"docker.logs,omitempty"` // canonical: docker.container-logs DockerNodeLs *DockerNodeLsOptions `json:"docker.node-ls,omitempty"` DockerPs *DockerContainerLsOptions `json:"docker.ps,omitempty"` // canonical: docker.container-ls DockerRun *DockerContainerRunOptions `json:"docker.run,omitempty"` // canonical: docker.container-run DockerServiceLogs *DockerServiceLogsOptions `json:"docker.service-logs,omitempty"` DockerServiceLs *DockerServiceLsOptions `json:"docker.service-ls,omitempty"` DockerServicePs *DockerServicePsOptions `json:"docker.service-ps,omitempty"` DockerStackServiceLogs *DockerStackServiceLogsOptions `json:"docker.stack-service-logs,omitempty"` DockerStackServiceLs *DockerStackServiceLsOptions `json:"docker.stack-service-ls,omitempty"` DockerStackServicePs *DockerStackServicePsOptions `json:"docker.stack-service-ps,omitempty"` DockerStackTaskLogs *DockerStackTaskLogsOptions `json:"docker.stack-task-logs,omitempty"` DockerTaskLogs *DockerTaskLogsOptions `json:"docker.task-logs,omitempty"` DockerTaskLs *DockerTaskLsOptions `json:"docker.task-ls,omitempty"` DockerVersion *DockerVersionOptions `json:"docker.version,omitempty"` KubernetesAPIVersions *KubernetesAPIVersionsOptions `json:"kubernetes.api-versions,omitempty"` KubernetesClusterInfo *KubernetesClusterInfoOptions `json:"kubernetes.cluster-info,omitempty"` KubernetesContainerCp *KubernetesContainerCpOptions `json:"kubernetes.container-cp,omitempty"` KubernetesLogs *KubernetesLogsOptions `json:"kubernetes.logs,omitempty"` KubernetesResourceList *KubernetesResourceListOptions `json:"kubernetes.resource-list,omitempty"` KubernetesVersion *KubernetesVersionOptions `json:"kubernetes.version,omitempty"` RetracedEvents *RetracedEventsOptions `json:"retraced.events,omitempty"` }
func (*Spec) Shared ¶
func (s *Spec) Shared() SpecShared
Todo maybe cache this or something this gets the shared stuff for a spec
ideally we want to move to - docker.container-inspect: container_name: ... output_dir: ... description: ... but for now its more like - docker.container-inspect: container_name: ... output_dir: ... description: ... This method allows you to use either or both, giving priority to the first, nested version i.e. if you have - docker.container-inspect: output_dir: /foo output_dir: /bar then /foo will be used
type SpecShared ¶
type SpecShared struct { // Description describes this spec field }
type StreamsProducer ¶
probably stdout and stderr
type StructuredProducer ¶
type SupportBundleVersionOptions ¶
type SupportBundleVersionOptions struct {
}type TaskListOptions ¶
func (*TaskListOptions) ToDockerTaskListOptions ¶
func (opts *TaskListOptions) ToDockerTaskListOptions() dockertypes.TaskListOptions
type UploadOptions ¶
type UploadOptions struct {
Prompt *PromptOptions `json:"prompt,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.