Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initializer ¶
type Initializer struct {
// contains filtered or unexported fields
}
Initializer is a helper struct to initialize a changefeed asynchronously.
func (*Initializer) Terminate ¶
func (initializer *Initializer) Terminate()
Terminate terminates the initializer. It will cancel the initialization if it is initializing. and wait for the initialization to finish. It's not thread-safe.
func (*Initializer) TryInitialize ¶
func (initializer *Initializer) TryInitialize(ctx context.Context, initFunc func(ctx context.Context) error, pool workerpool.AsyncPool, ) (bool, error)
TryInitialize tries to initialize the module asynchronously. returns true if the module is already initialized or initialized successfully. returns false if the module is initializing or failed to initialize. returns error if the module failed to initialize. It will only initialize the module once. It's not thread-safe.
Click to show internal directories.
Click to hide internal directories.