You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2020/12/14 23:07:39 UTC

[pulsar-client-go] branch master updated: Renamed Metrics.RpcRequestCount to RPCRequestCount to conform to style check (#417)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new a0f59a3  Renamed Metrics.RpcRequestCount to RPCRequestCount to conform to style check (#417)
a0f59a3 is described below

commit a0f59a38c443670e7b8d8ea586c8d6795cb0a748
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Mon Dec 14 15:07:28 2020 -0800

    Renamed Metrics.RpcRequestCount to RPCRequestCount to conform to style check (#417)
---
 pulsar/internal/metrics.go    | 6 +++---
 pulsar/internal/rpc_client.go | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/pulsar/internal/metrics.go b/pulsar/internal/metrics.go
index 820588f..875587c 100644
--- a/pulsar/internal/metrics.go
+++ b/pulsar/internal/metrics.go
@@ -56,7 +56,7 @@ type Metrics struct {
 	ConnectionsEstablishmentErrors prometheus.Counter
 	ConnectionsHandshakeErrors     prometheus.Counter
 	LookupRequestsCount            prometheus.Counter
-	RpcRequestCount                prometheus.Counter
+	RPCRequestCount                prometheus.Counter
 }
 
 type TopicMetrics struct {
@@ -268,7 +268,7 @@ func NewMetricsProvider(userDefinedLabels map[string]string) *Metrics {
 			ConstLabels: constLabels,
 		}),
 
-		RpcRequestCount: prometheus.NewCounter(prometheus.CounterOpts{
+		RPCRequestCount: prometheus.NewCounter(prometheus.CounterOpts{
 			Name:        "pulsar_client_rpc_count",
 			Help:        "Counter of RPC requests made by the client",
 			ConstLabels: constLabels,
@@ -306,7 +306,7 @@ func NewMetricsProvider(userDefinedLabels map[string]string) *Metrics {
 	prometheus.DefaultRegisterer.Register(metrics.ConnectionsEstablishmentErrors)
 	prometheus.DefaultRegisterer.Register(metrics.ConnectionsHandshakeErrors)
 	prometheus.DefaultRegisterer.Register(metrics.LookupRequestsCount)
-	prometheus.DefaultRegisterer.Register(metrics.RpcRequestCount)
+	prometheus.DefaultRegisterer.Register(metrics.RPCRequestCount)
 	return metrics
 }
 
diff --git a/pulsar/internal/rpc_client.go b/pulsar/internal/rpc_client.go
index fbd9492..0bb482c 100644
--- a/pulsar/internal/rpc_client.go
+++ b/pulsar/internal/rpc_client.go
@@ -108,7 +108,7 @@ func (c *rpcClient) RequestToAnyBroker(requestID uint64, cmdType pb.BaseCommand_
 
 func (c *rpcClient) Request(logicalAddr *url.URL, physicalAddr *url.URL, requestID uint64,
 	cmdType pb.BaseCommand_Type, message proto.Message) (*RPCResult, error) {
-	c.metrics.RpcRequestCount.Inc()
+	c.metrics.RPCRequestCount.Inc()
 	cnx, err := c.pool.GetConnection(logicalAddr, physicalAddr)
 	if err != nil {
 		return nil, err
@@ -138,7 +138,7 @@ func (c *rpcClient) Request(logicalAddr *url.URL, physicalAddr *url.URL, request
 
 func (c *rpcClient) RequestOnCnx(cnx Connection, requestID uint64, cmdType pb.BaseCommand_Type,
 	message proto.Message) (*RPCResult, error) {
-	c.metrics.RpcRequestCount.Inc()
+	c.metrics.RPCRequestCount.Inc()
 	wg := sync.WaitGroup{}
 	wg.Add(1)
 
@@ -158,7 +158,7 @@ func (c *rpcClient) RequestOnCnx(cnx Connection, requestID uint64, cmdType pb.Ba
 }
 
 func (c *rpcClient) RequestOnCnxNoWait(cnx Connection, cmdType pb.BaseCommand_Type, message proto.Message) error {
-	c.metrics.RpcRequestCount.Inc()
+	c.metrics.RPCRequestCount.Inc()
 	return cnx.SendRequestNoWait(baseCommand(cmdType, message))
 }