tracejob

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TraceJob

type TraceJob struct {
	Name                string
	ID                  types.UID
	Namespace           string
	ServiceAccount      string
	Hostname            string
	Program             string
	PodUID              string
	ContainerName       string
	IsPod               bool
	ImageNameTag        string
	InitImageNameTag    string
	FetchHeaders        bool
	Deadline            int64
	DeadlineGracePeriod int64
	StartTime           *metav1.Time
	Status              TraceJobStatus
	Patch               string
	PatchType           string
}

TraceJob is a container of info needed to create the job responsible for tracing.

type TraceJobClient

type TraceJobClient struct {
	JobClient    batchv1typed.JobInterface
	ConfigClient corev1typed.ConfigMapInterface
	// contains filtered or unexported fields
}

func (*TraceJobClient) CreateJob

func (t *TraceJobClient) CreateJob(nj TraceJob) (*batchv1.Job, error)

func (*TraceJobClient) DeleteJobs

func (t *TraceJobClient) DeleteJobs(nf TraceJobFilter) error

func (*TraceJobClient) GetJob

func (t *TraceJobClient) GetJob(nf TraceJobFilter) ([]TraceJob, error)

func (*TraceJobClient) WithOutStream

func (t *TraceJobClient) WithOutStream(o io.Writer)

WithOutStream setup a file stream to output trace job operation information

type TraceJobFilter

type TraceJobFilter struct {
	Name *string
	ID   *types.UID
}

type TraceJobStatus

type TraceJobStatus string

TraceJobStatus is a label for the running status of a trace job at the current time.

const (
	// TraceJobRunning means the trace job has active pods.
	TraceJobRunning TraceJobStatus = "Running"
	// TraceJobCompleted means the trace job does not have any active pod and has success pods.
	TraceJobCompleted TraceJobStatus = "Completed"
	// TraceJobFailed means the trace job does not have any active or success pod and has fpods that failed.
	TraceJobFailed TraceJobStatus = "Failed"
	// TraceJobUnknown means that for some reason we do not have the information to determine the status.
	TraceJobUnknown TraceJobStatus = "Unknown"
)

These are the valid status of traces.

Jump to

Keyboard shortcuts

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