Documentation
¶
Index ¶
- Variables
- func FiltersToArgs(f map[string][]string) filters.Args
- func GetUseDefaults(tasks []LifecycleTask) bool
- type BytesProducer
- type BytesScrubber
- 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 ImageListOptions
- type JournaldLogsOptions
- type KubernetesAPIVersionsOptions
- type KubernetesClusterInfoOptions
- type KubernetesLogsOptions
- type KubernetesResourceListOptions
- type KubernetesVersionOptions
- type LifecycleTask
- type MessageOptions
- type Meta
- type NodeListOptions
- 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..."}, }, { 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 ¶ added in v0.13.0
func GetUseDefaults(tasks []LifecycleTask) bool
Types ¶
type BytesScrubber ¶
type ContainerListOptions ¶ added in v0.5.0
type ContainerListOptions struct {
Quiet bool
Size bool
All bool
Latest bool
Since string
Before string
Limit int
Filters map[string][]string
}
func (*ContainerListOptions) ToDockerContainerListOptions ¶ added in v0.5.0
func (opts *ContainerListOptions) ToDockerContainerListOptions() dockertypes.ContainerListOptions
type CoreHTTPRequestOptions ¶ added in v0.11.0
type CoreHostnameOptions ¶ added in v0.11.0
type CoreHostnameOptions struct {
}
type CoreLoadavgOptions ¶ added in v0.11.0
type CoreLoadavgOptions struct {
Template string `json:"template"`
}
type CoreReadFileOptions ¶ added in v0.11.0
type CoreReadFileOptions struct {
Filepath string `json:"filepath"`
}
type CoreRunCommandOptions ¶ added in v0.11.0
type CoreUptimeOptions ¶ added in v0.11.0
type CoreUptimeOptions struct {
Template string `json:"template"`
}
type CustomerMetaOptions ¶ added in v0.11.0
type Doc ¶
type Doc struct {
Specs []Spec `json:"specs,omitempty"`
Lifecycle []LifecycleTask `json:"lifecycle,omitempty"`
}
type DockerContainerCpOptions ¶ added in v0.11.0
type DockerContainerExecOptions ¶ added in v0.11.0
type DockerContainerExecOptions struct {
Container string `json:"container"`
ExecConfig dockertypes.ExecConfig `json:"exec_config"`
}
type DockerContainerInspectOptions ¶ added in v0.2.0
type DockerContainerInspectOptions struct {
Container string `json:"container,omitempty"`
ContainerListOptions *ContainerListOptions `json:"container_list_options,omitempty"`
}
type DockerContainerLogsOptions ¶ added in v0.2.0
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 ¶ added in v0.11.0
type DockerContainerLsOptions struct {
ContainerListOptions `json:",inline,omitempty"`
}
type DockerContainerRunOptions ¶ added in v0.11.0
type DockerContainerRunOptions struct {
ContainerCreateConfig dockertypes.ContainerCreateConfig `json:"container_create_config"`
EnablePull bool `json:"enable_pull,omitempty"`
}
type DockerImageLsOptions ¶ added in v0.11.0
type DockerImageLsOptions struct {
ImageListOptions `json:",inline,omitempty"`
}
type DockerInfoOptions ¶ added in v0.11.0
type DockerInfoOptions struct {
}
type DockerNodeLsOptions ¶ added in v0.11.0
type DockerNodeLsOptions struct {
NodeListOptions `json:",inline,omitempty"`
}
type DockerServiceLogsOptions ¶ added in v0.11.0
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 ¶ added in v0.11.0
type DockerServiceLsOptions struct {
ServiceListOptions `json:",inline,omitempty"`
}
type DockerServicePsOptions ¶ added in v0.11.0
type DockerServicePsOptions struct {
DockerTaskLsOptions `json:",inline,omitempty"`
}
type DockerStackServiceLogsOptions ¶ added in v0.11.0
type DockerStackServiceLogsOptions struct {
Namespace string `json:"namespace"`
ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"`
DockerServiceLsOptions *DockerServiceLsOptions `json:"service_list_options,omitempty"`
}
type DockerStackServiceLsOptions ¶ added in v0.11.0
type DockerStackServiceLsOptions struct {
Namespace string `json:"namespace"`
DockerServiceLsOptions *DockerServiceLsOptions `json:"service_list_options,omitempty"`
}
type DockerStackServicePsOptions ¶ added in v0.11.0
type DockerStackServicePsOptions struct {
Namespace string `json:"namespace"`
DockerServicePsOptions *DockerServicePsOptions `json:"task_list_options,omitempty"`
}
type DockerStackTaskLogsOptions ¶ added in v0.11.0
type DockerStackTaskLogsOptions struct {
Namespace string `json:"namespace"`
ContainerLogsOptions *dockertypes.ContainerLogsOptions `json:"container_logs_options,omitempty"`
DockerServicePsOptions *DockerServicePsOptions `json:"task_list_options,omitempty"`
}
type DockerTaskLogsOptions ¶ added in v0.11.0
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 ¶ added in v0.11.0
type DockerTaskLsOptions struct {
TaskListOptions `json:",inline,omitempty"`
}
type DockerVersionOptions ¶ added in v0.11.0
type DockerVersionOptions struct {
}
type GenerateOptions ¶ added in v0.11.0
type GenerateOptions struct {
UseDefaults bool `json:"use_defaults,omitempty"`
}
type ImageListOptions ¶ added in v0.11.0
func (*ImageListOptions) ToDockerImageListOptions ¶ added in v0.11.0
func (opts *ImageListOptions) ToDockerImageListOptions() dockertypes.ImageListOptions
type JournaldLogsOptions ¶ added in v0.11.0
type KubernetesAPIVersionsOptions ¶ added in v0.11.0
type KubernetesAPIVersionsOptions struct {
}
type KubernetesClusterInfoOptions ¶ added in v0.11.0
type KubernetesClusterInfoOptions struct {
}
type KubernetesLogsOptions ¶ added in v0.11.0
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 ¶ added in v0.11.0
type KubernetesResourceListOptions struct {
Kind string `json:"kind"`
Namespace string `json:"namespace,omitempty"`
ListOptions *metav1.ListOptions `json:"resource_list_options,omitempty"`
}
type KubernetesVersionOptions ¶ added in v0.11.0
type KubernetesVersionOptions struct {
}
type LifecycleTask ¶ added in v0.11.0
type LifecycleTask struct {
Generate *GenerateOptions `json:"generate,omitempty"`
Message *MessageOptions `json:"message,omitempty"`
Upload *UploadOptions `json:"upload,omitempty"`
}
type MessageOptions ¶ added in v0.11.0
type MessageOptions struct {
Contents string `json:"contents,omitempty"`
}
type NodeListOptions ¶ added in v0.11.0
func (*NodeListOptions) ToDockerNodeListOptions ¶ added in v0.11.0
func (opts *NodeListOptions) ToDockerNodeListOptions() dockertypes.NodeListOptions
type PodLogOptions ¶ added in v0.11.0
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 ¶ added in v0.11.0
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 RetracedAPIClientOptions ¶ added in v0.11.0
type RetracedEventsOptions ¶ added in v0.3.1
type RetracedEventsOptions struct {
RetracedAPIClientOptions `json:",inline"`
Mask *retraced.EventNodeMask `json:"mask,omitempty"`
Query *retraced.StructuredQuery `json:"query,omitempty"`
}
type ServiceListOptions ¶ added in v0.11.0
func (*ServiceListOptions) ToDockerServiceListOptions ¶ added in v0.11.0
func (opts *ServiceListOptions) ToDockerServiceListOptions() dockertypes.ServiceListOptions
type Spec ¶
type Spec struct {
SupportBundleVersion *SupportBundleVersionOptions `json:"version,omitempty"`
CustomerMeta *CustomerMetaOptions `json:"meta.customer,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"`
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 ¶ added in v0.11.0
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 ¶ added in v0.11.0
type SpecShared struct {
// Description describes this spec field
}
type StreamsProducer ¶
probably stdout and stderr
type StructuredProducer ¶
type SupportBundleVersionOptions ¶ added in v0.11.0
type SupportBundleVersionOptions struct {
}
type TaskListOptions ¶ added in v0.11.0
func (*TaskListOptions) ToDockerTaskListOptions ¶ added in v0.11.0
func (opts *TaskListOptions) ToDockerTaskListOptions() dockertypes.TaskListOptions
type UploadOptions ¶ added in v0.11.0
type UploadOptions struct {
Prompt *PromptOptions `json:"prompt,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.