Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drainer support plugin framework #911

Open
wants to merge 65 commits into
base: plugin
Choose a base branch
from
Open

Conversation

tsthght
Copy link
Contributor

@tsthght tsthght commented Feb 25, 2020

What problem does this PR solve?

Drainer support plugin, #886

What is changed and how it works?

Add plugin framework to drainer, user can customize plugins, and use parameter plugin-name , plugin-path and support-plugin to load plugin into drainer.

Check List

Tests

  • Unit test

@tsthght tsthght changed the title Plugin Drainer support plugin framework Feb 25, 2020
drainer/config.go Outdated Show resolved Hide resolved
drainer/syncer.go Outdated Show resolved Hide resolved
drainer/syncer.go Outdated Show resolved Hide resolved
pkg/loader/executor.go Outdated Show resolved Hide resolved
@WangXiangUSTC
Copy link
Contributor

thanks @tsthght

drainer/syncer.go Outdated Show resolved Hide resolved
pkg/plugin/plugins.go Outdated Show resolved Hide resolved
pkg/plugin/plugins.go Outdated Show resolved Hide resolved
@hound hound bot deleted a comment from tsthght Mar 11, 2020
@hound hound bot deleted a comment from tsthght Mar 11, 2020
Copy link
Contributor

@WangXiangUSTC WangXiangUSTC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

drainer/isyncer.go Show resolved Hide resolved
func CreateMarkTable(db *sql.DB, mdbname, mtablename string) error {
// CreateMarkDBDDL is DDL to create the database of mark table.
var err error
var CreateMarkDBDDL = fmt.Sprintf("create database IF NOT EXISTS %s;", mdbname)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about use createMarkDBDDL because it is a variable in function now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had fixed it.

drainer/syncer.go Show resolved Hide resolved
drainer/syncer.go Show resolved Hide resolved
pkg/loader/executor.go Show resolved Hide resolved
@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC
Copy link
Contributor

@july2993 PTAL

@ti-chi-bot
Copy link
Member

@tsthght: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants