capture

package
v0.0.0-...-64decf6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 32 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCapture4Test

func NewCapture4Test(o owner.Owner) *captureImpl

NewCapture4Test returns a new Capture instance for test.

func NewCaptureWithManager4Test

func NewCaptureWithManager4Test(o owner.Owner, m *upstream.Manager) *captureImpl

NewCaptureWithManager4Test returns a new Capture instance for test.

func NewCaptureWithOwner4Test

func NewCaptureWithOwner4Test(o owner.Owner) *captureImpl

NewCaptureWithOwner4Test returns a new Capture instance for test.

Types

type Capture

type Capture interface {
	Run(ctx context.Context) error
	Close()
	Drain() <-chan struct{}
	Liveness() model.Liveness

	GetOwner() (owner.Owner, error)
	GetOwnerCaptureInfo(ctx context.Context) (*model.CaptureInfo, error)
	IsOwner() bool

	Info() (model.CaptureInfo, error)
	StatusProvider() owner.StatusProvider
	WriteDebugInfo(ctx context.Context, w io.Writer)

	GetUpstreamManager() (*upstream.Manager, error)
	GetEtcdClient() etcd.CDCEtcdClient
	// IsReady returns if the cdc server is ready
	// currently only check if ettcd data migration is done
	IsReady() bool
	GetUpstreamInfo(context.Context, model.UpstreamID, string) (*model.UpstreamInfo, error)
}

Capture represents a Capture server, it monitors the changefeed information in etcd and schedules Task on it.

func NewCapture

func NewCapture(pdEndpoints []string,
	etcdClient etcd.CDCEtcdClient,
	grpcService *p2p.ServerWrapper,
	sortEngineMangerFactory *factory.SortEngineFactory,
	pdClient pd.Client,
) Capture

NewCapture returns a new Capture instance

Directories

Path Synopsis
Package mock_capture is a generated GoMock package.
Package mock_capture is a generated GoMock package.

Jump to

Keyboard shortcuts

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