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

Add: interface of Metadata report #405

Merged
merged 218 commits into from
Mar 15, 2020

Conversation

hxmhlt
Copy link
Contributor

@hxmhlt hxmhlt commented Mar 14, 2020

What this PR does:
define interface of Metadata report
Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@hxmhlt hxmhlt requested a review from flycash March 14, 2020 13:44
common/extension/metadata_report_factory.go Outdated Show resolved Hide resolved
metaDataReportFactories = make(map[string]func() metadata.MetadataReportFactory)
)

// SetMetadataReportFactory ...
Copy link
Contributor

Choose a reason for hiding this comment

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

add remark.

metaDataReportFactories[name] = v
}

// GetConfigCenterFactory ...
Copy link
Contributor

Choose a reason for hiding this comment

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

add remark.

// GetConfigCenterFactory ...
func GetMetadataReportFactory(name string) metadata.MetadataReportFactory {
if metaDataReportFactories[name] == nil {
panic("metadata report for " + name + " is not existing, make sure you have import the package.")
Copy link
Contributor

Choose a reason for hiding this comment

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

panic? maybe u should return a error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extension is designed for dubbogo plugin system, we can not start the program when user's plugin is not exist.

config/metadata_report_config.go Outdated Show resolved Hide resolved
metadata/instance.go Outdated Show resolved Hide resolved
once sync.Once
)

// GetEnvInstance ...
Copy link
Contributor

Choose a reason for hiding this comment

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

delete the unuseful remark or add useful remark.

})
}

func GetMetadataReportInstance() MetadataReport {
Copy link
Contributor

Choose a reason for hiding this comment

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

add useful remark.

metadata/report_factory.go Outdated Show resolved Hide resolved
var (
MetadataReportInstance MetadataReport
)

Copy link
Contributor

Choose a reason for hiding this comment

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

add useful remark.

@AlexStocks
Copy link
Contributor

@hxmhlt pls add some words of "What this PR does:" for this pr.

@codecov-io
Copy link

codecov-io commented Mar 14, 2020

Codecov Report

Merging #405 into feature/dubbo-2.7.5 will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@                 Coverage Diff                  @@
##           feature/dubbo-2.7.5     #405   +/-   ##
====================================================
  Coverage                67.19%   67.19%           
====================================================
  Files                      163      163           
  Lines                     8387     8387           
====================================================
  Hits                      5636     5636           
  Misses                    2226     2226           
  Partials                   525      525           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d37f512...d37f512. Read the comment docs.

Copy link
Member

@flycash flycash left a comment

Choose a reason for hiding this comment

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

LGTM

@hxmhlt hxmhlt merged commit c86b2f2 into apache:feature/dubbo-2.7.5 Mar 15, 2020
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.