file

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
	BatchSize    int            `json:"batchSize"`    // Single Batch Write Size - The number of records to be written in a single batch.
	BatchTimeout time2.Duration `json:"batchTimeout"` // Single Batch Write Timeout - The maximum time allowed for a single batch write operation.
}

BaseConfig - Basic File Stream Output Configuration

func NewBaseConfig

func NewBaseConfig(conf *config.JSON) (*BaseConfig, error)

NewBaseConfig - Retrieves the basic file stream output configuration from a JSON configuration.

func (*BaseConfig) GetBatchSize

func (b *BaseConfig) GetBatchSize() int

GetBatchSize - Retrieves the number of records to be written in a single batch.

func (*BaseConfig) GetBatchTimeout

func (b *BaseConfig) GetBatchTimeout() time.Duration

GetBatchTimeout - Retrieves the maximum time allowed for a single batch write operation.

type Config

type Config interface {
	GetBatchSize() int              // Single Batch Write Size - The number of records to be written in a single batch.
	GetBatchTimeout() time.Duration // Single Batch Write Timeout - The maximum time allowed for a single batch write operation.
}

Config - File Stream Output Configuration

type Job

type Job struct {
	*plugin.BaseJob
}

Job

func NewJob

func NewJob() *Job

NewJob - Creates a new instance of a Job.

func (*Job) Destroy

func (j *Job) Destroy(ctx context.Context) (err error)

Destroy - Terminates or dismantles the Job.

type Task

type Task struct {
	*writer.BaseTask
	// contains filtered or unexported fields
}

Task

func NewTask

func NewTask(newConfig func(conf *config.JSON) (Config, error)) *Task

NewTask Create a task by obtaining the configuration newConfig

func (*Task) Destroy

func (t *Task) Destroy(ctx context.Context) (err error)

Destroy Destruction

func (*Task) Init

func (t *Task) Init(ctx context.Context) (err error)

Init Initialization

func (*Task) StartWrite

func (t *Task) StartWrite(ctx context.Context, receiver plugin.RecordReceiver) (err error)

StartWrite Start writing

Jump to

Keyboard shortcuts

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