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.
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.
Index ¶
- Variables
- func GetRawVersionInfo() string
- func RecordAppVersion(app string, cfg *Config)
- type AllConfig
- type AppConfig
- type CSVConfig
- type CheckConfig
- type CompareConfig
- type Config
- type DiffConfig
- type FullConfig
- type LogConfig
- type MetaConfig
- type MigrateConfig
- type MySQLConfig
- type OracleConfig
- type ReverseConfig
- type SchemaConfig
- type StructClusteredConfig
- type StructNonClusteredConfig
Constants ¶
This section is empty.
Variables ¶
var ( Version = "None" BuildTS = "None" GitHash = "None" GitBranch = "None" )
版本信息
Functions ¶
func GetRawVersionInfo ¶ added in v1.0.6
func GetRawVersionInfo() string
Types ¶
type AllConfig ¶
type AllConfig struct { LogminerQueryTimeout int `toml:"logminer-query-timeout" json:"logminer-query-timeout"` FilterThreads int `toml:"filter-threads" json:"filter-threads"` ApplyThreads int `toml:"apply-threads" json:"apply-threads"` WorkerQueue int `toml:"worker-queue" json:"worker-queue"` WorkerThreads int `toml:"worker-threads" json:"worker-threads"` }
type CSVConfig ¶
type CSVConfig struct { Header bool `toml:"header" json:"header"` Separator string `toml:"separator" json:"separator"` Terminator string `toml:"terminator" json:"terminator"` Charset string `toml:"charset" json:"charset"` Delimiter string `toml:"delimiter" json:"delimiter"` EscapeBackslash bool `toml:"escape-backslash" json:"escape-backslash"` NullValue string `toml:"null-value" json:"null-value"` Rows int `toml:"rows" json:"rows"` OutputDir string `toml:"output-dir" json:"output-dir"` TaskThreads int `toml:"task-threads" json:"task-threads"` TableThreads int `toml:"table-threads" json:"table-threads"` SQLThreads int `toml:"sql-threads" json:"sql-threads"` EnableCheckpoint bool `toml:"enable-checkpoint" json:"enable-checkpoint"` ConsistentRead bool `toml:"consistent-read" json:"consistent-read"` SQLHint string `toml:"sql-hint" json:"sql-hint"` CallTimeout int `toml:"call-timeout" json:"call-timeout"` }
type CheckConfig ¶ added in v1.0.10
type CompareConfig ¶ added in v1.0.17
type Config ¶ added in v1.0.6
type Config struct { *flag.FlagSet `json:"-"` AppConfig AppConfig `toml:"app" json:"app"` ReverseConfig ReverseConfig `toml:"reverse" json:"reverse"` CheckConfig CheckConfig `toml:"check" json:"check"` FullConfig FullConfig `toml:"full" json:"full"` CSVConfig CSVConfig `toml:"csv" json:"csv"` AllConfig AllConfig `toml:"all" json:"all"` SchemaConfig SchemaConfig `toml:"schema-config" json:"schema-config"` OracleConfig OracleConfig `toml:"oracle" json:"oracle"` MySQLConfig MySQLConfig `toml:"mysql" json:"mysql"` MetaConfig MetaConfig `toml:"meta" json:"meta"` LogConfig LogConfig `toml:"log" json:"log"` DiffConfig DiffConfig `toml:"compare" json:"compare"` ConfigFile string `json:"config-file"` PrintVersion bool TaskMode string `json:"task-mode"` DBTypeS string `json:"db-type-s"` DBTypeT string `json:"db-type-t"` }
程序配置文件
func (*Config) AdjustConfig ¶ added in v1.0.10
type DiffConfig ¶
type DiffConfig struct { ChunkSize int `toml:"chunk-size" json:"chunk-size"` DiffThreads int `toml:"diff-threads" json:"diff-threads"` OnlyCheckRows bool `toml:"only-check-rows" json:"only-check-rows"` EnableCheckpoint bool `toml:"enable-checkpoint" json:"enable-checkpoint"` IgnoreStructCheck bool `toml:"ignore-struct-check" json:"ignore-struct-check"` FixSqlDir string `toml:"fix-sql-dir" json:"fix-sql-dir"` }
type FullConfig ¶
type FullConfig struct { ChunkSize int `toml:"chunk-size" json:"chunk-size"` TaskThreads int `toml:"task-threads" json:"task-threads"` TableThreads int `toml:"table-threads" json:"table-threads"` SQLThreads int `toml:"sql-threads" json:"sql-threads"` ApplyThreads int `toml:"apply-threads" json:"apply-threads"` EnableCheckpoint bool `toml:"enable-checkpoint" json:"enable-checkpoint"` ConsistentRead bool `toml:"consistent-read" json:"consistent-read"` SQLHint string `toml:"sql-hint" json:"sql-hint"` CallTimeout int `toml:"call-timeout" json:"call-timeout"` }
type MetaConfig ¶ added in v1.0.11
type MigrateConfig ¶ added in v1.0.17
type MySQLConfig ¶
type MySQLConfig struct { Username string `toml:"username" json:"username"` Password string `toml:"password" json:"password"` Host string `toml:"host" json:"host"` Port int `toml:"port" json:"port"` Charset string `toml:"charset" json:"charset"` ConnectParams string `toml:"connect-params" json:"connect-params"` Overwrite bool `toml:"overwrite" json:"overwrite"` }
type OracleConfig ¶
type OracleConfig struct { Username string `toml:"username" json:"username"` Password string `toml:"password" json:"password"` Host string `toml:"host" json:"host"` Port int `toml:"port" json:"port"` ServiceName string `toml:"service-name" json:"service-name"` PDBName string `toml:"pdb-name" json:"pdb-name"` Charset string `toml:"charset" json:"charset"` LibDir string `toml:"lib-dir" json:"lib-dir"` ConnectParams string `toml:"connect-params" json:"connect-params"` SessionParams []string `toml:"session-params" json:"session-params"` }
type ReverseConfig ¶ added in v1.0.10
type ReverseConfig struct { LowerCaseFieldName string `toml:"lower-case-field-name" json:"lower-case-field-name"` ReverseThreads int `toml:"reverse-threads" json:"reverse-threads"` DirectWrite bool `toml:"direct-write" json:"direct-write"` DDLReverseDir string `toml:"ddl-reverse-dir" json:"ddl-reverse-dir"` DDLCompatibleDir string `toml:"ddl-compatible-dir" json:"ddl-compatible-dir"` }
type SchemaConfig ¶ added in v1.0.17
type SchemaConfig struct { SourceSchema string `toml:"source-schema" json:"source-schema"` SourceIncludeTable []string `toml:"source-include-table" json:"source-include-table"` SourceExcludeTable []string `toml:"source-exclude-table" json:"source-exclude-table"` TargetSchema string `toml:"target-schema" json:"target-schema"` GlobalTableOption string `toml:"global-table-option" json:"global-table-option"` CompareConfig []CompareConfig `toml:"compare-config" json:"compare-config"` MigrateConfig []MigrateConfig `toml:"migrate-config" json:"migrate-config"` StructNonClusteredConfig []StructNonClusteredConfig `toml:"struct-nonclustered-config" json:"struct-nonclustered-config"` StructClusteredConfig StructClusteredConfig `toml:"struct-clustered-config" json:"struct-clustered-config"` }
type StructClusteredConfig ¶ added in v1.0.23
type StructClusteredConfig struct {
SourceTable []string `toml:"source-table" json:"source-table"`
}