Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit b90227f

Browse files
authored
Merge pull request #601 from allencloud/change-func-name
change func name StartServer into NewServer
2 parents f140dba + 45a53f1 commit b90227f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cli/proxy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ var proxyCommand = cli.Command{
8585
}
8686

8787
grpcSock := context.String("proxy-hyperstart")
88-
glog.Infof("proxy.StartServer")
89-
s, err = proxy.StartServer(grpcSock, h)
88+
glog.Infof("proxy.NewServer")
89+
s, err = proxy.NewServer(grpcSock, h)
9090
if err != nil {
91-
glog.Errorf("proxy.StartServer() failed with err: %#v", err)
91+
glog.Errorf("proxy.NewServer() failed with err: %#v", err)
9292
return err
9393
}
9494
if _, err := os.Stat(grpcSock); !os.IsNotExist(err) {

hyperstart/proxy/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ func (proxy *jsonProxy) OnlineCPUMem(ctx context.Context, req *hyperstartgrpc.On
148148
return pbEmpty(err), err
149149
}
150150

151-
func StartServer(address string, json libhyperstart.Hyperstart) (*grpc.Server, error) {
152-
151+
// NewServer initializes a brand new grpc server with registered grpc services
152+
func NewServer(address string, json libhyperstart.Hyperstart) (*grpc.Server, error) {
153153
s := grpc.NewServer()
154154
jp := &jsonProxy{
155155
json: json,

0 commit comments

Comments
 (0)