writer

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTask

type BaseTask struct {
	*plugin.BaseTask
}

BaseTask: a fundamental task class that assists and simplifies the implementation of writing task interfaces

func NewBaseTask

func NewBaseTask() *BaseTask

NewBaseTask: a function or method to create a new instance of BaseTask

func (*BaseTask) SupportFailOver

func (b *BaseTask) SupportFailOver() bool

SupportFailOver: whether fault tolerance is supported, i.e., whether to retry after a failed write

type Job

type Job interface {
	plugin.Job

	// According to Job, the original task is divided into as many tasks as possible, which are mainly passed to each task in the form of configuration files.
	Split(ctx context.Context, number int) ([]*config.JSON, error)
}

Job work

type Task

type Task interface {
	plugin.Task

	// Start reading records from the receiver and write them
	StartWrite(ctx context.Context, receiver plugin.RecordReceiver) error
	// SupportFailOver: whether fault tolerance is supported, i.e., whether to retry after a failed write
	SupportFailOver() bool
}

Task: a task related to writing operations

Jump to

Keyboard shortcuts

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