vertica

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	sync.Mutex
	ODBCdsn string
	// contains filtered or unexported fields
}

Cache is main struct to store cached events and vertica server params

func Init

func Init(conf Config) (vertica *Cache, err error)

Init create vertica destination connection and return connect

func (*Cache) ApplyEvent

func (vc *Cache) ApplyEvent(receiver chan interface{}, skip chan string) chan error

ApplyEvent receive events to store in vertica

func (*Cache) Exec

func (vc *Cache) Exec(vsqls []string) (aff int64, err error)

Exec run vertica sql

func (*Cache) GetBotInterfaces

func (vc *Cache) GetBotInterfaces(skip chan string) map[string]func(msg string) string

GetBotInterfaces return handlers for bot realisations

func (*Cache) GetDropSQL

func (vc *Cache) GetDropSQL(drops []isql.DropTable) (vsqls []string)

GetDropSQL return drop statement

func (*Cache) GetHTTPInterfaces

func (vc *Cache) GetHTTPInterfaces(skip chan string) map[string]func(w http.ResponseWriter, r *http.Request)

GetHTTPInterfaces return http handlers

func (*Cache) GetLastPosition

func (vc *Cache) GetLastPosition(name string) (gtid string, err error)

GetLastPosition return existed gtid set in vsql if exist

func (*Cache) GetTableSQL

func (vc *Cache) GetTableSQL(ddl isql.CreateTable) (sqls []string)

GetTableSQL return create table statement in vsql

func (*Cache) GetTablesCacheInfo

func (vc *Cache) GetTablesCacheInfo(debug bool) string

GetTablesCacheInfo return current state of cache

type Config

type Config struct {
	Odbc       string
	Host       string
	Port       string
	User       string
	Password   string
	Database   string
	Pack       int
	FlushCount int    `yaml:"flush_count"`
	FlushTime  int    `yaml:"flush_time"`
	DataDir    string `yaml:"data_dir"`
}

Config is vertica server credentials and other params

Jump to

Keyboard shortcuts

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