Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
16b9bc78
Commit
16b9bc78
authored
Jun 17, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ServerPrivateAccessor::Prefix static
parent
81c8e7f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
prometheus_metrics_service.cpp
src/brpc/builtin/prometheus_metrics_service.cpp
+1
-1
server_private_accessor.h
src/brpc/details/server_private_accessor.h
+2
-1
No files found.
src/brpc/builtin/prometheus_metrics_service.cpp
View file @
16b9bc78
...
...
@@ -190,7 +190,7 @@ void PrometheusMetricsService::default_method(::google::protobuf::RpcController*
int
DumpPrometheusMetricsToIOBuf
(
butil
::
IOBuf
*
output
)
{
butil
::
IOBufBuilder
os
;
PrometheusMetricsDumper
dumper
(
&
os
,
brpc
::
ServerPrivateAccessor
(
NULL
).
Prefix
());
PrometheusMetricsDumper
dumper
(
&
os
,
brpc
::
ServerPrivateAccessor
::
Prefix
());
const
int
ndump
=
bvar
::
Variable
::
dump_exposed
(
&
dumper
,
NULL
);
if
(
ndump
<
0
)
{
return
-
1
;
...
...
src/brpc/details/server_private_accessor.h
View file @
16b9bc78
...
...
@@ -30,6 +30,7 @@ namespace brpc {
class
ServerPrivateAccessor
{
public
:
explicit
ServerPrivateAccessor
(
const
Server
*
svr
)
{
CHECK
(
svr
);
_server
=
svr
;
}
...
...
@@ -97,7 +98,7 @@ public:
RestfulMap
*
global_restful_map
()
const
{
return
_server
->
_global_restful_map
;
}
st
d
::
string
Prefix
()
const
{
return
Server
::
Prefix
();
}
st
atic
std
::
string
Prefix
()
{
return
Server
::
Prefix
();
}
private
:
const
Server
*
_server
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment