Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
d9f59b28
Commit
d9f59b28
authored
May 23, 2019
by
vito.he
Browse files
Options
Downloads
Patches
Plain Diff
Fix: error return msg not include service name
parent
9eb0e81d
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cluster/cluster_impl/failover_cluster_invoker.go
+1
-1
1 addition, 1 deletion
cluster/cluster_impl/failover_cluster_invoker.go
cluster/directory/static_directory.go
+6
-1
6 additions, 1 deletion
cluster/directory/static_directory.go
common/url.go
+10
-1
10 additions, 1 deletion
common/url.go
with
17 additions
and
3 deletions
cluster/cluster_impl/failover_cluster_invoker.go
+
1
−
1
View file @
d9f59b28
This diff is collapsed.
Click to expand it.
cluster/directory/static_directory.go
+
6
−
1
View file @
d9f59b28
...
...
@@ -25,8 +25,13 @@ type staticDirectory struct {
}
func
NewStaticDirectory
(
invokers
[]
protocol
.
Invoker
)
*
staticDirectory
{
var
url
common
.
URL
if
len
(
invokers
)
>
0
{
url
=
invokers
[
0
]
.
GetUrl
()
}
return
&
staticDirectory
{
BaseDirectory
:
NewBaseDirectory
(
&
common
.
URL
{}
),
BaseDirectory
:
NewBaseDirectory
(
&
url
),
invokers
:
invokers
,
}
}
...
...
This diff is collapsed.
Click to expand it.
common/url.go
+
10
−
1
View file @
d9f59b28
...
...
@@ -248,7 +248,16 @@ func (c URL) Context() context.Context {
}
func
(
c
URL
)
Service
()
string
{
return
strings
.
TrimPrefix
(
c
.
Path
,
"/"
)
service
:=
strings
.
TrimPrefix
(
c
.
Path
,
"/"
)
if
service
!=
""
{
return
service
}
else
if
c
.
SubURL
!=
nil
{
service
=
strings
.
TrimPrefix
(
c
.
SubURL
.
Path
,
"/"
)
if
service
!=
""
{
//if url.path is "" then return suburl's path, special for registry Url
return
service
}
}
return
""
}
func
(
c
URL
)
GetParam
(
s
string
,
d
string
)
string
{
var
r
string
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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