Documentation
¶
Index ¶
Constants ¶
View Source
const (
OutputMySQL = "mysql"
)
Variables ¶
View Source
var ( ProcessedMsgCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "drc_v2", Subsystem: "output_mysql", Name: "processed_msg_count", Help: "processed msg count", }, []string{metrics.PipelineTag, "type"}) )
Functions ¶
func AddMissingColumn ¶
AddMissingColumn add data to msg if target table has extra columns. It is considered safe since this casting does not lose information.
Types ¶
type MySQLOutput ¶
type MySQLOutput struct {
// contains filtered or unexported fields
}
func (*MySQLOutput) Close ¶
func (output *MySQLOutput) Close()
func (*MySQLOutput) Configure ¶
func (output *MySQLOutput) Configure(pipelineName string, data map[string]interface{}) error
func (*MySQLOutput) Execute ¶
func (output *MySQLOutput) Execute(msgs []*core.Msg) error
msgs in the same batch should have the same table name
func (*MySQLOutput) Start ¶
func (output *MySQLOutput) Start() error
type MySQLPluginConfig ¶
type MySQLPluginConfig struct { DBConfig *utils.DBConfig `mapstructure:"target" json:"target"` Routes []map[string]interface{} `mapstructure:"routes" json:"routes"` EnableDDL bool `mapstructure:"enable-ddl" json:"enable-ddl"` EngineConfig *config.GenericConfig `mapstructure:"sql-engine-config" json:"sql-engine-config"` }
Click to show internal directories.
Click to hide internal directories.