processor

package
v0.0.0-...-4624acb Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 38 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMetrics

func InitMetrics(registry *prometheus.Registry)

InitMetrics registers all metrics used in processor

func NewProcessor

func NewProcessor(
	info *model.ChangeFeedInfo,
	status *model.ChangeFeedStatus,
	captureInfo *model.CaptureInfo,
	changefeedID model.ChangeFeedID,
	up *upstream.Upstream,
	liveness *model.Liveness,
	changefeedEpoch uint64,
	cfg *config.SchedulerConfig,
	ownerCaptureInfoClient etcd.OwnerCaptureInfoClient,
	globalVars *vars.GlobalVars,
) *processor

NewProcessor creates a new processor

Types

type Manager

type Manager interface {
	orchestrator.Reactor

	// Close the manager itself and all processors. Can't be called with `Tick` concurrently.
	// After it's called, all other methods shouldn't be called any more.
	Close()

	WriteDebugInfo(ctx context.Context, w io.Writer, done chan<- error)
}

Manager is a manager of processor, which maintains the state and behavior of processors

func NewManager

func NewManager(
	captureInfo *model.CaptureInfo,
	upstreamManager *upstream.Manager,
	liveness *model.Liveness,
	cfg *config.SchedulerConfig,
	globalVars *vars.GlobalVars,
) Manager

NewManager creates a new processor manager

type Processor

type Processor interface {
	// Tick is called periodically to drive the Processor's internal logic.
	// The main logic of processor is in this function, including the calculation of many kinds of ts,
	// maintain table components, error handling, etc.
	//
	// It can be called in etcd ticks, so it should never be blocked.
	// Tick Returns: error and warnings. error will be propagated to the owner, and warnings will be record.
	Tick(context.Context, *model.ChangeFeedInfo, *model.ChangeFeedStatus) (error, error)

	// Close closes the processor.
	Close() error
}

Processor is the processor of changefeed data.

Directories

Path Synopsis
Package mock_processor is a generated GoMock package.
Package mock_processor is a generated GoMock package.
sorter/memory
Package memory is an in-memory table based EventSortEngine implementation.
Package memory is an in-memory table based EventSortEngine implementation.
sorter/mock
Package mock_sorter is a generated GoMock package.
Package mock_sorter is a generated GoMock package.
sorter/pebble
Package pebble is an pebble-based EventSortEngine implementation with such properties:
Package pebble is an pebble-based EventSortEngine implementation with such properties:

Jump to

Keyboard shortcuts

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