Documentation ¶
Index ¶
- Constants
- type Filter
- type FilterType
- type Flavor
- type Http
- type Instance
- type Kafka
- type Mode
- type Mysql
- type OptionPipeline
- func WithAddFilter(filter *Filter) OptionPipeline
- func WithPipeDelete(d bool) OptionPipeline
- func WithPipeMode(mode Mode) OptionPipeline
- func WithPipeSafe(uPipe *Pipeline) OptionPipeline
- func WithPipeStatus(status Status) OptionPipeline
- func WithUpdateFilter(index int, filter *Filter) OptionPipeline
- type OptionPosition
- type Output
- type Pipeline
- type PipelineH
- type Position
- type Sender
- type Status
- type Stdout
Constants ¶
View Source
const SENDER_TYPE_KAFKA = "kafka"
View Source
const SNEDER_TYPE_HTTP = "http"
View Source
const SNEDER_TYPE_STDOUT = "stdout"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { Type FilterType `json:"type"` Rule string `json:"rule"` }
Filter of pipeline
type FilterType ¶
type FilterType string
FilterType types of filter
const ( // FILTER_WHITE white list FILTER_WHITE FilterType = "white" // FILTER_BLACK black list FILTER_BLACK FilterType = "black" )
type Instance ¶
type Instance struct { PipelineName string `json:"pipeline_name"` NodeName string `json:"node_name"` CreateTime time.Time `json:"create_time"` }
Instance store struct
type Kafka ¶
type Kafka struct { Brokers string `json:"brokers"` Topic string `json:"topic"` RequiredAcks *sarama.RequiredAcks `json:"require_acks"` Compression *sarama.CompressionCodec `json:"compression"` Retries *int `json:"retries"` Idepotent *bool `json:"idepotent"` }
type Mysql ¶
type Mysql struct { Address string `json:"address"` Port uint16 `json:"port"` User string `json:"user"` Password string `json:"password"` ServerId uint32 `json:"server_id"` Flavor Flavor `json:"flavor"` Mode Mode `json:"mode"` }
Mysql store struct
type OptionPipeline ¶
type OptionPipeline func(p *Pipeline)
OptionPipeline configure pipeline
func WithAddFilter ¶
func WithAddFilter(filter *Filter) OptionPipeline
func WithPipeDelete ¶
func WithPipeDelete(d bool) OptionPipeline
func WithPipeMode ¶
func WithPipeMode(mode Mode) OptionPipeline
func WithPipeStatus ¶
func WithPipeStatus(status Status) OptionPipeline
WithPipeStatus sets pipeline status
func WithUpdateFilter ¶
func WithUpdateFilter(index int, filter *Filter) OptionPipeline
type OptionPosition ¶
type OptionPosition func(position *Position)
OptionPosition Position options
func WithBinlogFile ¶
func WithBinlogFile(b string) OptionPosition
WithBinlogFile sets binlog file to OptionPosition
func WithGTIDSet ¶
func WithGTIDSet(g string) OptionPosition
WithGTIDSet sets GTIDSet to OptionPosition
type Pipeline ¶
type Pipeline struct { Name string `json:"name"` Status Status `json:"status"` AliasName string `json:"aliasName"` Mysql *Mysql `json:"mysql"` Filters []*Filter `json:"filters"` Output *Output `json:"output"` Replicas int `json:"replicas"` CreateTime time.Time `json:"create_time"` Remark string `json:"remark"` IsDelete bool `json:"is_delete"` }
Pipeline pipeline's definition
type PipelineH ¶
func NewPipelineH ¶
func NewPipelineH() *PipelineH
type Position ¶
type Position struct { BinlogFile string `json:"binlog_file"` BinlogPosition uint32 `json:"binlog_position"` //GTIDSet string `json:"gtid_set"` GTIDSet string `json:"gtid_set"` PipelineName string `json:"pipeline_name"` }
Position mysql replication position
Click to show internal directories.
Click to hide internal directories.