rdb

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckPoint

type CheckPoint struct {
	CheckPointColumn     string
	CheckPointColumnType string
	Value                string
	LastUpdateTime       time.Time
}

type ColumnResolverFunc

type ColumnResolverFunc func(string) (string, error)

type Rdb

type Rdb struct {
	ColumnsHash           map[string]string
	ConnectionRetryTime   int
	ConnectionRetryWaitMs int
	Driver                string
	Address               string
	Port                  int
	DataBase              string
	User                  string
	Password              string
	PasswordPath          string
	DialTimeOutMs         int
	ReadTimeOutMs         int
	Limit                 bool
	PageSize              int
	MaxSyncSize           int
	StateMent             string
	StateMentPath         string
	CheckPoint            bool
	CheckPointColumn      string
	// int or time
	CheckPointColumnType  string
	CheckPointStart       string
	CheckPointSavePerPage bool
	IntervalMs            int

	Shutdown chan struct{}

	Context pipeline.Context
	// contains filtered or unexported fields
}

func (*Rdb) CheckPointToString

func (m *Rdb) CheckPointToString() string

func (*Rdb) Collect

func (m *Rdb) Collect(collector pipeline.Collector, columnResolverFuncMap map[string]ColumnResolverFunc) error

func (*Rdb) Init

func (m *Rdb) Init(context pipeline.Context, rdbFunc RdbFunc) (int, error)

func (*Rdb) InitCheckPointFromString

func (m *Rdb) InitCheckPointFromString(val string)

func (*Rdb) ParseRows

func (m *Rdb) ParseRows(rows *sql.Rows, columnResolverFuncMap map[string]ColumnResolverFunc, collector pipeline.Collector) int

func (*Rdb) SaveCheckPoint

func (m *Rdb) SaveCheckPoint(collector pipeline.Collector)

func (*Rdb) Start

func (m *Rdb) Start(collector pipeline.Collector, connStr string, rdbFunc RdbFunc, columnResolverFuncMap map[string]ColumnResolverFunc) error

Start starts the ServiceInput's service, whatever that may be

func (*Rdb) Stop

func (m *Rdb) Stop() error

Stop stops the services and closes any necessary channels and connections

type RdbFunc

type RdbFunc func() error //nolint:revive

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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