Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
4ea5c773
Commit
4ea5c773
authored
4 years ago
by
vito.he
Browse files
Options
Downloads
Patches
Plain Diff
Mod:resolve pr review
parent
dceaed09
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
metadata/report/delegate/delegate_report.go
+9
-14
9 additions, 14 deletions
metadata/report/delegate/delegate_report.go
with
9 additions
and
14 deletions
metadata/report/delegate/delegate_report.go
+
9
−
14
View file @
4ea5c773
...
...
@@ -147,7 +147,7 @@ func NewMetadataReport() (*MetadataReport, error) {
// retry will do metadata failed reports collection by call metadata report sdk
func
(
bmr
*
MetadataReport
)
retry
()
bool
{
bmr
.
failedReportsLock
.
RLock
()
bmr
.
failedReportsLock
.
Unlock
()
defer
bmr
.
failedReportsLock
.
R
Unlock
()
return
bmr
.
doHandlerMetadataCollection
(
bmr
.
failedReports
)
}
...
...
@@ -155,9 +155,8 @@ func (bmr *MetadataReport) retry() bool {
func
(
bmr
*
MetadataReport
)
StoreProviderMetadata
(
identifier
*
identifier
.
MetadataIdentifier
,
definer
definition
.
ServiceDefiner
)
{
if
bmr
.
syncReport
{
bmr
.
storeMetadataTask
(
common
.
PROVIDER
,
identifier
,
definer
)
}
else
{
go
bmr
.
storeMetadataTask
(
common
.
PROVIDER
,
identifier
,
definer
)
}
go
bmr
.
storeMetadataTask
(
common
.
PROVIDER
,
identifier
,
definer
)
}
// storeMetadataTask will delegate to call remote metadata's sdk to store
...
...
@@ -208,9 +207,8 @@ func (bmr *MetadataReport) storeMetadataTask(role int, identifier *identifier.Me
func
(
bmr
*
MetadataReport
)
StoreConsumerMetadata
(
identifier
*
identifier
.
MetadataIdentifier
,
definer
map
[
string
]
string
)
{
if
bmr
.
syncReport
{
bmr
.
storeMetadataTask
(
common
.
CONSUMER
,
identifier
,
definer
)
}
else
{
go
bmr
.
storeMetadataTask
(
common
.
CONSUMER
,
identifier
,
definer
)
}
go
bmr
.
storeMetadataTask
(
common
.
CONSUMER
,
identifier
,
definer
)
}
// SaveServiceMetadata will delegate to call remote metadata's sdk to save service metadata
...
...
@@ -218,10 +216,9 @@ func (bmr *MetadataReport) SaveServiceMetadata(identifier *identifier.ServiceMet
report
:=
instance
.
GetMetadataReportInstance
()
if
bmr
.
syncReport
{
return
report
.
SaveServiceMetadata
(
identifier
,
url
)
}
else
{
go
report
.
SaveServiceMetadata
(
identifier
,
url
)
return
nil
}
go
report
.
SaveServiceMetadata
(
identifier
,
url
)
return
nil
}
// RemoveServiceMetadata will delegate to call remote metadata's sdk to remove service metadata
...
...
@@ -229,10 +226,9 @@ func (bmr *MetadataReport) RemoveServiceMetadata(identifier *identifier.ServiceM
report
:=
instance
.
GetMetadataReportInstance
()
if
bmr
.
syncReport
{
return
report
.
RemoveServiceMetadata
(
identifier
)
}
else
{
go
report
.
RemoveServiceMetadata
(
identifier
)
return
nil
}
go
report
.
RemoveServiceMetadata
(
identifier
)
return
nil
}
// GetExportedURLs will delegate to call remote metadata's sdk to get exported urls
...
...
@@ -246,10 +242,9 @@ func (bmr *MetadataReport) SaveSubscribedData(identifier *identifier.SubscriberM
report
:=
instance
.
GetMetadataReportInstance
()
if
bmr
.
syncReport
{
return
report
.
SaveSubscribedData
(
identifier
,
urls
)
}
else
{
go
report
.
SaveSubscribedData
(
identifier
,
urls
)
return
nil
}
go
report
.
SaveSubscribedData
(
identifier
,
urls
)
return
nil
}
// GetSubscribedURLs will delegate to call remote metadata's sdk to get subscribed urls
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment