lightning

package
v0.0.0-...-41b4272 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0, Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckpointRemove

func CheckpointRemove(ctx context.Context, cfg *config.Config, tableName string) error

func CleanupEngine

func CleanupEngine(ctx context.Context, cfg *config.Config, tls *common.TLS, engine string) error

func CleanupMetas

func CleanupMetas(ctx context.Context, cfg *config.Config, tableName string) error

func SwitchMode

func SwitchMode(ctx context.Context, cfg *config.Config, tls *common.TLS, mode string) error

func UnsafeCloseEngine

func UnsafeCloseEngine(ctx context.Context, importer backend.Backend, engine string) (*backend.ClosedEngine, error)

Types

type Lightning

type Lightning struct {
	// contains filtered or unexported fields
}

func New

func New(globalCfg *config.GlobalConfig) *Lightning

func (*Lightning) GoServe

func (l *Lightning) GoServe() error

func (*Lightning) RunOnce

func (l *Lightning) RunOnce(taskCtx context.Context, taskCfg *config.Config, glue glue.Glue) error

RunOnce is used by binary lightning and host when using lightning as a library.

  • for binary lightning, taskCtx could be context.Background which means taskCtx wouldn't be canceled directly by its cancel function, but only by Lightning.Stop or HTTP DELETE using l.cancel. and glue could be nil to let lightning use a default glue later.
  • for lightning as a library, taskCtx could be a meaningful context that get canceled outside, and glue could be a caller implemented glue.

func (*Lightning) RunServer

func (l *Lightning) RunServer() error

func (*Lightning) Status

func (l *Lightning) Status() (finished int64, total int64)

Status return the sum size of file which has been imported to TiKV and the total size of source file.

func (*Lightning) Stop

func (l *Lightning) Stop()

Jump to

Keyboard shortcuts

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