Documentation ¶
Index ¶
- Constants
- func Draw(pis []*pps.PipelineInfo, opts ...RenderOption) (string, error)
- func JobState(jobState ppsclient.JobState) string
- func ParseKubeEvent(s string, event *KubeEvent) error
- func PrintCheckStatus(w io.Writer, checkSatusResponse *ppsclient.CheckStatusResponse)
- func PrintCreatePipelineRequest(w io.Writer, req *ppsclient.CreatePipelineRequest) error
- func PrintDatumInfo(w io.Writer, datumInfo *ppsclient.DatumInfo)
- func PrintDetailedDatumInfo(w io.Writer, datumInfo *ppsclient.DatumInfo)
- func PrintDetailedJobInfo(w io.Writer, jobInfo *PrintableJobInfo) error
- func PrintDetailedPipelineInfo(w io.Writer, pipelineInfo *PrintablePipelineInfo) error
- func PrintFile(w io.Writer, file *pfsclient.File)
- func PrintFileHeader(w io.Writer)
- func PrintJobInfo(w io.Writer, jobInfo *ppsclient.JobInfo, fullTimestamps bool)
- func PrintJobSetInfo(w io.Writer, jobSetInfo *ppsclient.JobSetInfo, fullTimestamps bool)
- func PrintKubeEvent(w io.Writer, event string)
- func PrintPipelineInfo(w io.Writer, pipelineInfo *ppsclient.PipelineInfo, fullTimestamps bool)
- func PrintSecretInfo(w io.Writer, secretInfo *ppsclient.SecretInfo)
- func PrintWorkerStatus(w io.Writer, workerStatus *ppsclient.WorkerStatus, fullTimestamps bool)
- func PrintWorkerStatusHeader(w io.Writer)
- func Progress(ji *ppsclient.JobInfo) string
- func ShorthandInput(input *ppsclient.Input) string
- type KubeEvent
- type PrintableJobInfo
- type PrintablePipelineInfo
- type RenderOption
Constants ¶
const ( // PipelineHeader is the header for pipelines. PipelineHeader = "PROJECT\tNAME\tVERSION\tINPUT\tCREATED\tSTATE / LAST JOB\tALERTS\tDESCRIPTION\t\n" // JobHeader is the header for jobs JobHeader = "PROJECT\tPIPELINE\tID\tSTARTED\tDURATION\tRESTART\tPROGRESS\tDL\tUL\tSTATE\t\n" // JobSetHeader is the header for jobsets JobSetHeader = "ID\tSUBJOBS\tPROGRESS\tCREATED\tMODIFIED\n" // DatumHeader is the header for datums DatumHeader = "ID\tFILES\tSTATUS\tTIME\t\n" // SecretHeader is the header for secrets SecretHeader = "NAME\tTYPE\tCREATED\t\n" // KubeEventsHeader is the header for kubernetes events KubeEventsHeader = "LAST SEEN\tTYPE\tREASON\tOBJECT\tMESSAGE\t\n" // CheckStatusHeader is the header for pipeline check statuse calls CheckStatusHeader = "PROJECT\tPIPELINE\tALERT\t\n" )
Variables ¶
This section is empty.
Functions ¶
func Draw ¶
func Draw(pis []*pps.PipelineInfo, opts ...RenderOption) (string, error)
func ParseKubeEvent ¶
func PrintCheckStatus ¶ added in v2.9.0
func PrintCheckStatus(w io.Writer, checkSatusResponse *ppsclient.CheckStatusResponse)
func PrintCreatePipelineRequest ¶ added in v2.8.0
func PrintCreatePipelineRequest(w io.Writer, req *ppsclient.CreatePipelineRequest) error
PrintCreatePipelineRequest pretty-prints a create pipeline request.
func PrintDatumInfo ¶
PrintDatumInfo pretty-prints file info. If recurse is false and directory size is 0, display "-" instead If fast is true and file size is 0, display "-" instead
func PrintDetailedDatumInfo ¶
PrintDetailedDatumInfo pretty-prints detailed info about a datum
func PrintDetailedJobInfo ¶
func PrintDetailedJobInfo(w io.Writer, jobInfo *PrintableJobInfo) error
PrintDetailedJobInfo pretty-prints detailed job info.
func PrintDetailedPipelineInfo ¶
func PrintDetailedPipelineInfo(w io.Writer, pipelineInfo *PrintablePipelineInfo) error
PrintDetailedPipelineInfo pretty-prints detailed pipeline info.
func PrintFileHeader ¶
PrintFileHeader prints the header for a pfs file.
func PrintJobInfo ¶
PrintJobInfo pretty-prints job info.
func PrintJobSetInfo ¶
func PrintJobSetInfo(w io.Writer, jobSetInfo *ppsclient.JobSetInfo, fullTimestamps bool)
PrintJobSetInfo pretty-prints jobset info.
func PrintKubeEvent ¶
func PrintPipelineInfo ¶
func PrintPipelineInfo(w io.Writer, pipelineInfo *ppsclient.PipelineInfo, fullTimestamps bool)
PrintPipelineInfo pretty-prints pipeline info.
func PrintSecretInfo ¶
func PrintSecretInfo(w io.Writer, secretInfo *ppsclient.SecretInfo)
PrintSecretInfo pretty-prints secret info.
func PrintWorkerStatus ¶
func PrintWorkerStatus(w io.Writer, workerStatus *ppsclient.WorkerStatus, fullTimestamps bool)
PrintWorkerStatus pretty prints a worker status.
func PrintWorkerStatusHeader ¶
PrintWorkerStatusHeader pretty prints a worker status header.
func ShorthandInput ¶
ShorthandInput renders a pps.Input as a short, readable string
Types ¶
type PrintableJobInfo ¶
PrintableJobInfo is a wrapper around JobInfo containing any formatting options used within the template to conditionally print information.
func NewPrintableJobInfo ¶
func NewPrintableJobInfo(ji *ppsclient.JobInfo, full bool) *PrintableJobInfo
NewPrintableJobInfo constructs a PrintableJobInfo from just a JobInfo.
type PrintablePipelineInfo ¶
type PrintablePipelineInfo struct { *ppsclient.PipelineInfo FullTimestamps bool }
PrintablePipelineInfo is a wrapper around PipelineInfo containing any formatting options used within the template to conditionally print information.
func NewPrintablePipelineInfo ¶
func NewPrintablePipelineInfo(pi *ppsclient.PipelineInfo) *PrintablePipelineInfo
NewPrintablePipelineInfo constructs a PrintablePipelineInfo from just a PipelineInfo.
type RenderOption ¶
type RenderOption func(*renderConfig)
func BoxWidthOption ¶
func BoxWidthOption(boxWidth int) RenderOption
func EdgeHeightOption ¶
func EdgeHeightOption(verticalSpace int) RenderOption