capture

package
v0.0.0-...-be15534 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 33 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 NewCaptureWithController4Test

func NewCaptureWithController4Test(o owner.Owner,
	manager controller.Controller,
) *captureImpl

NewCaptureWithController4Test 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.

Types

type Capture

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

	GetOwner() (owner.Owner, error)
	GetController() (controller.Controller, error)
	GetControllerCaptureInfo(ctx context.Context) (*model.CaptureInfo, error)
	IsController() 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