taskflow

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2020 Marvin

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWorkerPool

func CreateWorkerPool(numOfWorkers int, jobQueue chan IncrementPayload, resultQueue chan IncrementResult)

func GetIncrementResult

func GetIncrementResult(done chan bool, resultQueue chan IncrementResult)

func LoaderOracleTableFullRecordToMySQLByFullMode

func LoaderOracleTableFullRecordToMySQLByFullMode(cfg *service.CfgFile, engine *service.Engine) error
全量同步任务

全量数据导出导入

func SyncOracleTableAllRecordToMySQLByAllMode

func SyncOracleTableAllRecordToMySQLByAllMode(cfg *service.CfgFile, engine *service.Engine) error

增量同步任务

Types

type IncrementPayload

type IncrementPayload struct {
	GlobalSCN      int             `json:"global_scn"`
	SourceTableSCN int             `json:"source_table_scn"`
	SourceSchema   string          `json:"source_schema"`
	SourceTable    string          `json:"source_table"`
	TargetSchema   string          `json:"target_schema"`
	TargetTable    string          `json:"target_table"`
	Operation      string          `json:"operation"`
	OracleRedo     string          `json:"oracle_redo"` // Oracle 已执行 SQL
	MySQLRedo      []string        `json:"mysql_redo"`  // MySQL 待执行 SQL
	OperationType  string          `json:"operation_type"`
	Engine         *service.Engine `json:"-"`
}

func (*IncrementPayload) Marshal

func (p *IncrementPayload) Marshal() string

序列化

func (*IncrementPayload) Run

func (p *IncrementPayload) Run() error

任务同步

type IncrementResult

type IncrementResult struct {
	Payload IncrementPayload
	Status  bool
}

type LogminerData

type LogminerData struct {
	// contains filtered or unexported fields
}

func NewScheduleJob

func NewScheduleJob(size int, lcMap map[string][]service.LogminerContent, done func()) *LogminerData

func (*LogminerData) AddData

func (s *LogminerData) AddData(v service.LogminerContent)

func (*LogminerData) Close

func (s *LogminerData) Close()

func (*LogminerData) Schedule

func (s *LogminerData) Schedule()

type Stmt

type Stmt struct {
	Schema    string
	Table     string
	Columns   []string
	Operation string
	Data      map[string]interface{}
	Before    map[string]interface{}
	WhereExpr string
}

func (*Stmt) Enter

func (v *Stmt) Enter(in ast.Node) (ast.Node, bool)

WARNING: sql parser Format() has be discrepancy ,be is instead of Restore()

func (*Stmt) Leave

func (v *Stmt) Leave(in ast.Node) (ast.Node, bool)

func (*Stmt) Marshal

func (v *Stmt) Marshal() string

Jump to

Keyboard shortcuts

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