vars

package
v0.0.0-...-592a62f Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalVars

type GlobalVars struct {
	CaptureInfo *model.CaptureInfo
	EtcdClient  etcd.CDCEtcdClient

	// SortEngineManager is introduced for pull-based sinks.
	SortEngineFactory *factory.SortEngineFactory

	// OwnerRevision is the Etcd revision when the owner got elected.
	OwnerRevision int64

	// MessageServer and MessageRouter are for peer-messaging
	MessageServer *p2p.MessageServer
	MessageRouter p2p.MessageRouter

	// ChangefeedThreadPool is the thread pool for changefeed initialization
	ChangefeedThreadPool workerpool.AsyncPool
}

GlobalVars contains some vars which can be used anywhere in a pipeline the lifecycle of vars in the GlobalVars should be aligned with the ticdc server process. All field in Vars should be READ-ONLY and THREAD-SAFE

func NewGlobalVars4Test

func NewGlobalVars4Test() *GlobalVars

NewGlobalVars4Test returns a GlobalVars for test,

func NewGlobalVarsAndChangefeedInfo4Test

func NewGlobalVarsAndChangefeedInfo4Test() (*GlobalVars, *model.ChangeFeedInfo)

NewGlobalVarsAndChangefeedInfo4Test returns GlobalVars and model.ChangeFeedInfo for ut

type NonAsyncPool

type NonAsyncPool struct{}

NonAsyncPool is a dummy implementation of workerpool.AsyncPool, which runs tasks synchronously. It is used in tests to avoid the overhead of asynchronous task scheduling.

func (*NonAsyncPool) Go

func (f *NonAsyncPool) Go(_ context.Context, fn func()) error

Go runs the task synchronously.

func (*NonAsyncPool) Run

func (f *NonAsyncPool) Run(_ context.Context) error

Run does nothing.

Jump to

Keyboard shortcuts

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