processor

package
v0.0.0-...-d18c366 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package processor implements plugins to process the task events and results

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RenderProcessor

type RenderProcessor struct {
	// contains filtered or unexported fields
}

RenderProcessor is a processor that writes the result to an io.Writer

func Render

func Render(wr io.Writer, color bool) *RenderProcessor

Render returns a configured RenderProcessor

func (*RenderProcessor) TaskCompleted

func (r *RenderProcessor) TaskCompleted(ctx context.Context, logger gornir.Logger, task gornir.Task) error

TaskCompleted doesn't do anything

func (*RenderProcessor) TaskInstanceCompleted

func (r *RenderProcessor) TaskInstanceCompleted(ctx context.Context, logger gornir.Logger, jobResult *gornir.JobResult, host *gornir.Host, task gornir.Task) error

TaskInstanceCompleted renders either the result or the error resulted in the execution of the TaskInstance

func (*RenderProcessor) TaskInstanceStarted

func (r *RenderProcessor) TaskInstanceStarted(ctx context.Context, logger gornir.Logger, host *gornir.Host, task gornir.Task) error

TaskInstanceStarted doesn't do anything

func (*RenderProcessor) TaskStarted

func (r *RenderProcessor) TaskStarted(ctx context.Context, logger gornir.Logger, task gornir.Task) error

TaskStarted renders task.Metdata().Identifier or the task's struct's name

Jump to

Keyboard shortcuts

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