service

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: Apache-2.0 Imports: 28 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.

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 AddCronTask

func AddCronTask(ctx context.Context, c *cron.Cron, cli *clientv3.Client, req *pb.OperateTaskRequest, job cron.Job) (*pb.OperateTaskResponse, error)

func DeleteAssessMigrateTask

func DeleteAssessMigrateTask(ctx context.Context, req *pb.DeleteAssessMigrateTaskRequest) (string, error)

func DeleteCsvMigrateTask

func DeleteCsvMigrateTask(ctx context.Context, req *pb.DeleteCsvMigrateTaskRequest) (string, error)

func DeleteDataCompareTask

func DeleteDataCompareTask(ctx context.Context, req *pb.DeleteDataCompareTaskRequest) (string, error)

func DeleteDataScanTask

func DeleteDataScanTask(ctx context.Context, req *pb.DeleteDataScanTaskRequest) (string, error)

func DeleteDatabase

func DeleteDatabase(etcdClient *clientv3.Client, defaultDatabaseDBMSKey string) error

func DeleteDatasource

func DeleteDatasource(ctx context.Context, req *pb.DeleteDatasourceRequest) error

func DeleteSchemaRouteRule

func DeleteSchemaRouteRule(ctx context.Context, taskName []string) error

func DeleteSqlMigrateRule

func DeleteSqlMigrateRule(ctx context.Context, taskName []string) error

func DeleteSqlMigrateTask

func DeleteSqlMigrateTask(ctx context.Context, req *pb.DeleteSqlMigrateTaskRequest) (string, error)

func DeleteStmtMigrateTask

func DeleteStmtMigrateTask(ctx context.Context, req *pb.DeleteStmtMigrateTaskRequest) (string, error)

func DeleteStructCompareTask

func DeleteStructCompareTask(ctx context.Context, req *pb.DeleteStructCompareTaskRequest) (string, error)

func DeleteStructMigrateTask

func DeleteStructMigrateTask(ctx context.Context, req *pb.DeleteStructMigrateTaskRequest) (string, error)

func GenAssessMigrateTask

func GenAssessMigrateTask(ctx context.Context, serverAddr, taskName, outputDir string) error

func GenDataCompareTask

func GenDataCompareTask(ctx context.Context, serverAddr, taskName, outputDir string) error

func GenDataScanTask

func GenDataScanTask(ctx context.Context, serverAddr, taskName, outputDir string) error

func GenStructCompareTask

func GenStructCompareTask(ctx context.Context, serverAddr, taskName, outputDir string) error

func GenStructMigrateTask

func GenStructMigrateTask(ctx context.Context, serverAddr, taskName, outputDir string) error

func ShowAssessMigrateTask

func ShowAssessMigrateTask(ctx context.Context, req *pb.ShowAssessMigrateTaskRequest) (string, error)

func ShowCsvMigrateTask

func ShowCsvMigrateTask(ctx context.Context, req *pb.ShowCsvMigrateTaskRequest) (string, error)

func ShowDataCompareTask

func ShowDataCompareTask(ctx context.Context, req *pb.ShowDataCompareTaskRequest) (string, error)

func ShowDataScanTask

func ShowDataScanTask(ctx context.Context, req *pb.ShowDataScanTaskRequest) (string, error)

func ShowDatabase

func ShowDatabase(etcdClient *clientv3.Client, defaultDatabaseDBMSKey string) (string, error)

func ShowDatasource

func ShowDatasource(ctx context.Context, req *pb.ShowDatasourceRequest) (string, error)

func ShowSchemaRouteRule

func ShowSchemaRouteRule(ctx context.Context, taskName string) (*pb.SchemaRouteRule, []*pb.DataMigrateRule, []*pb.DataCompareRule, error)

func ShowSqlMigrateRule

func ShowSqlMigrateRule(ctx context.Context, taskName string) ([]*pb.SqlMigrateRule, error)

func ShowSqlMigrateTask

func ShowSqlMigrateTask(ctx context.Context, req *pb.ShowSqlMigrateTaskRequest) (string, error)

func ShowStmtMigrateTask

func ShowStmtMigrateTask(ctx context.Context, req *pb.ShowStmtMigrateTaskRequest) (string, error)

func ShowStructCompareTask

func ShowStructCompareTask(ctx context.Context, req *pb.ShowStructCompareTaskRequest) (string, error)

func ShowStructMigrateTask

func ShowStructMigrateTask(ctx context.Context, req *pb.ShowStructMigrateTaskRequest) (string, error)

func StartAssessMigrateTask

func StartAssessMigrateTask(ctx context.Context, taskName, workerAddr string) error

func StartCsvMigrateTask

func StartCsvMigrateTask(ctx context.Context, taskName, workerAddr string) error

func StartDataCompareTask

func StartDataCompareTask(ctx context.Context, taskName, workerAddr string) error

func StartDataScanTask

func StartDataScanTask(ctx context.Context, taskName, workerAddr string) error

func StartSqlMigrateTask

func StartSqlMigrateTask(ctx context.Context, taskName, workerAddr string) error

func StartStmtMigrateTask

func StartStmtMigrateTask(ctx context.Context, taskName, workerAddr string) error

func StartStructCompareTask

func StartStructCompareTask(ctx context.Context, taskName, workerAddr string) error

func StartStructMigrateTask

func StartStructMigrateTask(ctx context.Context, taskName, workerAddr string) error

func StartTask

func StartTask(ctx context.Context, cli *clientv3.Client, discoveries *etcdutil.Discovery, req *pb.OperateTaskRequest) (*pb.OperateTaskResponse, error)

func StopAssessMigrateTask

func StopAssessMigrateTask(ctx context.Context, taskName string) error

func StopCsvMigrateTask

func StopCsvMigrateTask(ctx context.Context, taskName string) error

func StopDataCompareTask

func StopDataCompareTask(ctx context.Context, taskName string) error

func StopDataScanTask

func StopDataScanTask(ctx context.Context, taskName string) error

func StopSqlMigrateTask

func StopSqlMigrateTask(ctx context.Context, taskName string) error

func StopStmtMigrateTask

func StopStmtMigrateTask(ctx context.Context, taskName string) error

func StopStructCompareTask

func StopStructCompareTask(ctx context.Context, taskName string) error

func StopStructMigrateTask

func StopStructMigrateTask(ctx context.Context, taskName string) error

func UpsertAssessMigrateTask

func UpsertAssessMigrateTask(ctx context.Context, req *pb.UpsertAssessMigrateTaskRequest) (string, error)

func UpsertCsvMigrateTask

func UpsertCsvMigrateTask(ctx context.Context, req *pb.UpsertCsvMigrateTaskRequest) (string, error)

func UpsertDataCompareTask

func UpsertDataCompareTask(ctx context.Context, req *pb.UpsertDataCompareTaskRequest) (string, error)

func UpsertDataScanTask

func UpsertDataScanTask(ctx context.Context, req *pb.UpsertDataScanTaskRequest) (string, error)

func UpsertDatabase

func UpsertDatabase(etcdClient *clientv3.Client, defaultDatabaseDBMSKey string, req *pb.UpsertDatabaseRequest) (string, error)

func UpsertDatasource

func UpsertDatasource(ctx context.Context, req *pb.UpsertDatasourceRequest) (string, error)

func UpsertSchemaRouteRule

func UpsertSchemaRouteRule(ctx context.Context, taskName, datasourceNameS string, caseFieldRule *pb.CaseFieldRule, schemaRouteRule *pb.SchemaRouteRule,
	dataMigrateRules []*pb.DataMigrateRule, dataCompareRules []*pb.DataCompareRule) error

func UpsertSqlMigrateRule

func UpsertSqlMigrateRule(ctx context.Context, taskName string, caseFieldRule *pb.CaseFieldRule, sqlRouteRule []*pb.SqlMigrateRule) error

func UpsertSqlMigrateTask

func UpsertSqlMigrateTask(ctx context.Context, req *pb.UpsertSqlMigrateTaskRequest) (string, error)

func UpsertStmtMigrateTask

func UpsertStmtMigrateTask(ctx context.Context, req *pb.UpsertStmtMigrateTaskRequest) (string, error)

func UpsertStructCompareTask

func UpsertStructCompareTask(ctx context.Context, req *pb.UpsertStructCompareTaskRequest) (string, error)

func UpsertStructMigrateTask

func UpsertStructMigrateTask(ctx context.Context, req *pb.UpsertStructMigrateTaskRequest) (string, error)

Types

type Cronjob

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

func NewCronjob

func NewCronjob(ctx context.Context,
	cli *clientv3.Client, discoveries *etcdutil.Discovery, taskName string) *Cronjob

func (*Cronjob) Run

func (c *Cronjob) Run()

type Crontab

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

func NewServiceCrontab

func NewServiceCrontab(ctx context.Context, etcdCli *clientv3.Client, discoveries *etcdutil.Discovery, cron *cron.Cron) *Crontab

func (*Crontab) Close

func (c *Crontab) Close() error

Close used for close service

func (*Crontab) Load

func (c *Crontab) Load(expressPrefixKey string) error

func (*Crontab) Watch

func (c *Crontab) Watch(expressPrefixKey, entryPrefixKey string) error

type Entry

type Entry struct {
	EntryID cron.EntryID
}

func (*Entry) String

func (e *Entry) String() string

Jump to

Keyboard shortcuts

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