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

refine querybuilder factory to register way, to avoid switch case mod… #239

Conversation

kitianFresh
Copy link
Contributor

…e. each implementer only register by init way

What type of PR is this?

refine querybuilder factory to register way

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #238

Special notes for your reviewer:

…e. each implementer only register by init way
@kitianFresh kitianFresh self-assigned this Mar 30, 2022
@kitianFresh kitianFresh added this to the 0.4.0 milestone Mar 30, 2022
@qmhu
Copy link
Member

qmhu commented Apr 14, 2022

/LGTM


type BuilderFactoryFunc func(metric *metricquery.Metric) Builder

func RegisterBuilderFactory(metricSource metricquery.MetricSource, initFunc BuilderFactoryFunc) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need lock here?

@kitianFresh kitianFresh merged commit 9a995c0 into gocrane:main Apr 14, 2022
@github-actions
Copy link
Contributor

😭 Deploy PR Preview eaf446f failed. Build logs

🤖 By surge-preview

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

Successfully merging this pull request may close these issues.

refine querybuilder factory to register way, to avoid switch case mode
2 participants