fmt.Printf("{job %s / pod %s / container %s} %s %s\n",chunk.JobName,chunk.PodName,chunk.ContainerName,line.Timestamp,line.Data)// TODO: make normal formatting as follows.
fmt.Println(line.Data)
// TODO The client could work like state machine:
// TODO when receiving job-pod-container log chunk print header "==> job X pod X container Y logs <==\n",
// TODO just like `tail -f *` works on multiple files at the same time.
// TODO When receiving job-pod-container log chunk for another pod or container or job,
// TODO client print new header and follow with log lines.
// TODO Also there will be other than log-chunk events: userspace-error or system-error.
// TODO The main reason to stream userspace-events like ImagePullBackOff or CrashLoopBackOff is
// TODO to give user enough info so that user can debug templates without accessing cluster using kubectl.
}
}
}elseifresp.WatchFeed.GetJobPodError()!=nil{
}elseifresp.WatchFeed.GetJobPodError()!=nil{
fmt.Printf("ERROR: %v",resp.WatchFeed.GetJobPodError())// TODO: normal formatting