mysql2elasticsearch

package module
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexOf

func IndexOf(data []string, element string) int

func SetLogger added in v1.0.12

func SetLogger(w io.Writer)

Types

type DBDataTypeMapping

type DBDataTypeMapping struct {
	Index      int
	TableIndex int
	Field      string
	Type       reflect.Type
}

type ESQueueItem

type ESQueueItem struct {
	Action     string
	IndexName  string
	PrimaryKey string
	Data       interface{}
}

type Queue

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

func NewQueue

func NewQueue() *Queue

func (*Queue) Dequeue

func (c *Queue) Dequeue() (interface{}, error)

func (*Queue) Empty

func (c *Queue) Empty() bool

func (*Queue) Enqueue

func (c *Queue) Enqueue(value interface{})

func (*Queue) Size

func (c *Queue) Size() int

type SyncMySQLToElasticSearch

type SyncMySQLToElasticSearch struct {
	canal.DummyEventHandler
	// contains filtered or unexported fields
}

func NewSyncMySQLToElasticSearch

func NewSyncMySQLToElasticSearch(addr, user, password, dbName, esAddr, esUser, esPassword string, option ...SyncMySQLToElasticSearchOption) (*SyncMySQLToElasticSearch, error)

func (*SyncMySQLToElasticSearch) Init

func (this *SyncMySQLToElasticSearch) Init(addr, user, password, dbName, esAddr, esUser, esPassword string, option SyncMySQLToElasticSearchOption) error

func (*SyncMySQLToElasticSearch) OnPosSynced

func (this *SyncMySQLToElasticSearch) OnPosSynced(pos mysql.Position, _ mysql.GTIDSet, force bool) error

func (*SyncMySQLToElasticSearch) OnRow

func (this *SyncMySQLToElasticSearch) OnRow(rowsEvent *canal.RowsEvent) error

func (*SyncMySQLToElasticSearch) RegisterTable

func (this *SyncMySQLToElasticSearch) RegisterTable(tableName string, tableStruct interface{}) error

func (*SyncMySQLToElasticSearch) SetOnPosSynced added in v1.0.1

func (this *SyncMySQLToElasticSearch) SetOnPosSynced(onPostSynced func(name string, pos uint32, force bool))

func (*SyncMySQLToElasticSearch) Sync

func (this *SyncMySQLToElasticSearch) Sync() error

func (*SyncMySQLToElasticSearch) SyncFrom

func (this *SyncMySQLToElasticSearch) SyncFrom(binlogFile string, binlogPosition uint32) error

type SyncMySQLToElasticSearchOption

type SyncMySQLToElasticSearchOption struct {
	IndexNameSeparator string
	QueueSize          int
	MaxQueueSize       int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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