converter

package
v0.0.0-...-a55c58d Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	DbName   string
	ColName  string
	LuaState *lua.LState
	// contains filtered or unexported fields
}

Converter load LUA for handle mongo opload record

func New

func New(filePath string, sqlDb *sql.DB) (*Converter, error)

New create new converter

func (*Converter) Close

func (conv *Converter) Close()

Close converter (LuaState)

func (*Converter) FullName

func (conv *Converter) FullName() string

FullName return databse name + collection name

func (*Converter) Inserted

func (conv *Converter) Inserted(doc Document) error

Inserted handler new records

func (*Converter) ProcessOplogRecord

func (conv *Converter) ProcessOplogRecord(oplogRecord Document) error

ProcessOplogRecord accept oplog record and process with operation callback

type Document

type Document map[string]interface{}

Document is record of oplog collection

type Map

type Map map[string]*Converter

Map string to Converter

func LoadAll

func LoadAll(sqlDb *sql.DB) (Map, error)

LoadAll converters

func (Map) Names

func (converters Map) Names() []string

Names of converter collections

Jump to

Keyboard shortcuts

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