refactoring

This commit is contained in:
Chris Lu
2019-06-15 12:21:44 -07:00
parent 5336008dcd
commit 8b43679ae3
8 changed files with 53 additions and 34 deletions

View File

@@ -1,9 +1,12 @@
package weed_server
import (
"google.golang.org/grpc"
"fmt"
"net/http"
"github.com/chrislusf/seaweedfs/weed/stats"
"google.golang.org/grpc"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/storage"
@@ -84,7 +87,8 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
}
go vs.heartbeat()
startPushingMetric("volumeServer", volumeServerGather, metricsAddress, metricsIntervalSec)
hostAddress := fmt.Sprintf("%s:%d", ip, port)
stats.StartPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather, metricsAddress, metricsIntervalSec)
return vs
}