summaryrefslogtreecommitdiffstats
path: root/proxy
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-11-05 00:16:25 +0100
committerOndrej Fabry <ofabry@cisco.com>2019-11-05 00:16:25 +0100
commit2f75863ba9bff2d2f3488b70e441b5eefc91dfd2 (patch)
tree5c54cbb3ceb47f18c9baf5c477607c212c3bcb06 /proxy
parent73733b0a8ab8612233c98f9828f5f563c69fc2b7 (diff)
Begin development of next release 0.3.0
- update info in package ./version - update to Go 1.13 - regenerate ./examples/binapi for latest VPP: 19.08.1-release - clean code in proxy - refactor Makefile Change-Id: Ibf5c2682c2f4b3cbbea4aa1e35d3f02175d40a9b Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'proxy')
-rw-r--r--proxy/client.go2
-rw-r--r--proxy/log.go5
-rw-r--r--proxy/proxy.go3
-rw-r--r--proxy/server.go4
4 files changed, 8 insertions, 6 deletions
diff --git a/proxy/client.go b/proxy/client.go
index 7f92946..6f29c71 100644
--- a/proxy/client.go
+++ b/proxy/client.go
@@ -16,12 +16,12 @@ package proxy
import (
"fmt"
- "git.fd.io/govpp.git/core"
"net/rpc"
"reflect"
"time"
"git.fd.io/govpp.git/api"
+ "git.fd.io/govpp.git/core"
)
type Client struct {
diff --git a/proxy/log.go b/proxy/log.go
index 2810528..d53e532 100644
--- a/proxy/log.go
+++ b/proxy/log.go
@@ -1,8 +1,9 @@
package proxy
import (
- "github.com/sirupsen/logrus"
"os"
+
+ "github.com/sirupsen/logrus"
)
var (
@@ -27,4 +28,4 @@ func SetLogger(l *logrus.Logger) {
// SetLogLevel sets global logger level to lvl.
func SetLogLevel(lvl logrus.Level) {
log.Level = lvl
-} \ No newline at end of file
+}
diff --git a/proxy/proxy.go b/proxy/proxy.go
index 33cf05f..6656ee5 100644
--- a/proxy/proxy.go
+++ b/proxy/proxy.go
@@ -83,10 +83,11 @@ func (p *Server) ListenAndServe(addr string) error {
l, e := net.Listen("tcp", addr)
if e != nil {
- return fmt.Errorf("listen error:", e)
+ return fmt.Errorf("listen failed: %v", e)
}
defer l.Close()
log.Printf("proxy serving on: %v", addr)
+
return http.Serve(l, nil)
}
diff --git a/proxy/server.go b/proxy/server.go
index ecb0e8d..472ad16 100644
--- a/proxy/server.go
+++ b/proxy/server.go
@@ -92,7 +92,7 @@ func (s *StatsRPC) watchConnection() {
s.mu.Lock()
if err := s.statsConn.GetSystemStats(prev); err != nil {
atomic.StoreUint32(&s.available, 0)
- log.Warnf("disabling statsRPC service, reason:", err)
+ log.Warnf("disabling statsRPC service, reason: %v", err)
}
s.mu.Unlock()
@@ -110,7 +110,7 @@ func (s *StatsRPC) watchConnection() {
s.mu.Lock()
if err := s.statsConn.GetSystemStats(curr); err != nil {
atomic.StoreUint32(&s.available, 0)
- log.Warnf("disabling statsRPC service, reason:", err)
+ log.Warnf("disabling statsRPC service, reason: %v", err)
}
s.mu.Unlock()