pipeline

package
v0.0.0-...-1b33b2a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

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

Types

type KeySpanPipeline

type KeySpanPipeline interface {
	// ID returns the ID of source keyspan and mark keyspan
	ID() (keyspanID uint64)
	// Name returns the quoted schema and keyspan name
	Name() string
	// ResolvedTs returns the resolved ts in this keyspan pipeline
	ResolvedTs() model.Ts
	// CheckpointTs returns the checkpoint ts in this keyspan pipeline
	CheckpointTs() model.Ts
	// UpdateBarrierTs updates the barrier ts in this keyspan pipeline
	UpdateBarrierTs(ts model.Ts)
	// AsyncStop tells the pipeline to stop, and returns true is the pipeline is already stopped.
	AsyncStop(targetTs model.Ts) bool
	// Workload returns the workload of this keyspan
	Workload() model.WorkloadInfo
	// Status returns the status of this keyspan pipeline
	Status() KeySpanStatus
	// Cancel stops this keyspan pipeline immediately and destroy all resources created by this keyspan pipeline
	Cancel()
	// Wait waits for keyspan pipeline destroyed
	Wait()
}

KeySpanPipeline is a pipeline which capture the change log from tikv in a keyspan

func NewKeySpanPipeline

func NewKeySpanPipeline(ctx cdcContext.Context,
	keyspanID model.KeySpanID,
	replicaInfo *model.KeySpanReplicaInfo,
	sink sink.Sink,
	targetTs model.Ts,
) KeySpanPipeline

NewKeySpanPipeline creates a keyspan pipeline

type KeySpanStatus

type KeySpanStatus int32

KeySpanStatus is status of the keyspan pipeline

const (
	KeySpanStatusInitializing KeySpanStatus = iota
	KeySpanStatusRunning
	KeySpanStatusStopped
)

KeySpanStatus for keyspan pipeline

func (*KeySpanStatus) Load

func (s *KeySpanStatus) Load() KeySpanStatus

Load KeySpanStatus with THREAD-SAFE

func (*KeySpanStatus) Store

func (s *KeySpanStatus) Store(new KeySpanStatus)

Store KeySpanStatus with THREAD-SAFE

func (KeySpanStatus) String

func (s KeySpanStatus) String() string

Jump to

Keyboard shortcuts

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