runner

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader is a reader executor.

func NewReader

func NewReader(task reader.Task, sender plugin.RecordSender, taskKey string) *Reader

NewReader creates a reader executor through the reading task, the record sender, and the task keyword.

func (*Reader) Plugin

func (r *Reader) Plugin() plugin.Task

Plugin is a plugin task.

func (*Reader) Run

func (r *Reader) Run(ctx context.Context) (err error)

Run is the execution sequence: Init->Prepare->StartRead->Post->Destroy.

func (*Reader) Shutdown

func (r *Reader) Shutdown() error

Shutdown is the action to close.

type Runner

type Runner interface {
	Plugin() plugin.Task           // Plugin Task - A task associated with a plugin
	Shutdown() error               // Close - Shuts down or terminates the operation of the runner
	Run(ctx context.Context) error // Run - Initiates the execution of a task or job by the runner
}

Runner - A component responsible for executing tasks or jobs

type Writer

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

Writer: Write Runner

func NewWriter

func NewWriter(task writer.Task, receiver plugin.RecordReceiver, taskKey string) *Writer

NewWriter: Creates a write runner by reading the task, the recorder, and the task keyword

func (*Writer) Plugin

func (w *Writer) Plugin() plugin.Task

Plugin: Plugin task

func (*Writer) Run

func (w *Writer) Run(ctx context.Context) (err error)

Run: Runs in the following order: Init->Prepare->StartWrite->Post->Destroy

func (*Writer) Shutdown

func (w *Writer) Shutdown() error

Shutdown: Closes down

Jump to

Keyboard shortcuts

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