Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCockpitOutputWriter ¶ added in v1.6.4
Types ¶
type DecoratedOutputWriter ¶
DecoratedOutputWriter is a decorator for task output. It extends io.Writer with methods to write header before output starts and footer after execution completes
type OutputEnum ¶ added in v1.6.4
type OutputEnum string
const ( RawOutput OutputEnum = "raw" CockpitOutput OutputEnum = "cockpit" PrefixedOutput OutputEnum = "prefixed" )
type SafeWriter ¶ added in v1.6.4
type SafeWriter struct {
// contains filtered or unexported fields
}
func NewSafeWriter ¶ added in v1.6.4
func NewSafeWriter(writerImpl io.Writer) *SafeWriter
NewSafeWriter initiates a new concurrency safe writer
func (*SafeWriter) Len ¶ added in v1.6.4
func (tw *SafeWriter) Len() int
func (*SafeWriter) String ¶ added in v1.6.4
func (tw *SafeWriter) String() string
type TaskOutput ¶
type TaskOutput struct {
// contains filtered or unexported fields
}
TaskOutput connects given task with requested decorator
func NewTaskOutput ¶
NewTaskOutput creates new TaskOutput instance for given task.
func (*TaskOutput) Close ¶ added in v1.6.4
func (t *TaskOutput) Close()
Close releases resources and closes underlying decorators
func (TaskOutput) Finish ¶
func (o TaskOutput) Finish() error
Finish should be called after task completes
func (TaskOutput) Start ¶
func (o TaskOutput) Start() error
Start should be called before task's output starts
func (*TaskOutput) Stderr ¶
func (o *TaskOutput) Stderr() io.Writer
Stderr returns io.Writer that can be used for Job's STDERR
func (*TaskOutput) Stdout ¶
func (o *TaskOutput) Stdout() io.Writer
Stdout returns io.Writer that can be used for Job's STDOUT
func (*TaskOutput) WithCloseCh ¶ added in v1.6.4
func (t *TaskOutput) WithCloseCh(closeCh chan bool) *TaskOutput
Click to show internal directories.
Click to hide internal directories.