controller

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	AsyncStop()
	GetChangefeedOwnerCaptureInfo(id model.ChangeFeedID) *model.CaptureInfo
	GetAllChangeFeedInfo(ctx context.Context) (
		map[model.ChangeFeedID]*model.ChangeFeedInfo, error,
	)
	GetAllChangeFeedCheckpointTs(ctx context.Context) (
		map[model.ChangeFeedID]uint64, error,
	)
	GetCaptures(ctx context.Context) ([]*model.CaptureInfo, error)
	GetProcessors(ctx context.Context) ([]*model.ProcInfoSnap, error)
	IsChangefeedExists(ctx context.Context, id model.ChangeFeedID) (bool, error)
	CreateChangefeed(context.Context,
		*model.UpstreamInfo,
		*model.ChangeFeedInfo,
	) error
}

Controller is a manager to schedule changefeeds

func NewController

func NewController(
	upstreamManager *upstream.Manager,
	captureInfo *model.CaptureInfo,
	etcdClient etcd.CDCEtcdClient,
) Controller

NewController creates a new Controller

type Query

type Query struct {
	Tp           QueryType
	ChangeFeedID model.ChangeFeedID

	Data interface{}
}

Query wraps query command and return results.

type QueryType

type QueryType int32

QueryType is the type of different queries.

const (
	// QueryAllChangeFeedSCheckpointTs query all changefeed checkpoint ts.
	QueryAllChangeFeedSCheckpointTs QueryType = iota
	// QueryAllChangeFeedInfo is the type of query all changefeed info.
	QueryAllChangeFeedInfo
	// QueryCaptures is the type of query captures info.
	QueryCaptures
	// QueryExists is the type of query check if a changefeed is exists
	QueryExists
	// QueryProcessors is the type of query processor info
	QueryProcessors
)

Directories

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

Jump to

Keyboard shortcuts

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