core

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input interface {
	NewInput(config interface{}, ruleRegex []string, inSchema Schema)
	StartInput(pos Position, syncChan *channel.SyncChannel) Position
	StartMetrics()
	Close()
	SetIncludeTableRegex(map[string]interface{}) (*regexp.Regexp, error)    // for add rule
	RemoveIncludeTableRegex(map[string]interface{}) (*regexp.Regexp, error) // for delete rule
}

type Output

type Output interface {
	NewOutput(config interface{}, rulesMap map[string]interface{}, inSchema Schema)
	StartOutput(outputChan *channel.OutputChannel)
	Execute(msgs []*msg.Msg, tableObj *schema.Table, targetSchema string, targetTable string) error
	Close()
	AddRule(map[string]interface{}) error
	DeleteRule(map[string]interface{}) error
	GetRules() interface{}
	Pause() error
	Resume() error
	IsPaused() bool
}

type Position

type Position interface {
	LoadPosition(config *config.BaseConfig) string
	SavePosition() error
	ModifyPosition(v string) error
	StartPosition()
	Close()
}

type Rule

type Rule interface {
	NewRule(map[string]interface{})
	GetRuleToRegex() []string
	GetRuleToMap() map[string]interface{}
	GetRule(key string) interface{}
	TargetString() string
}

type Schema

type Schema interface {
	NewSchemaTables(config *config.BaseConfig, pluginConfig map[string]interface{}, startPos string, rulesMap map[string]interface{})
	AddTableForMsg(msg *msg.Msg) error
	AddTable(db string, table string) (*schema.Table, error)
	DelTable(db string, table string) error
	UpdateTable(db string, table string, args interface{}, pos string, index int) error
	GetTable(db string, table string) (*schema.Table, error)
	RefreshTable(db string, table string)
	SaveMeta(data string) error
	Close()
}

Jump to

Keyboard shortcuts

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