Skip to content

Commit 46972db

Browse files
committed
Remove unused rpc.Server field
1 parent 1226444 commit 46972db

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

rpc/server.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ type Server struct {
4848
ctx context.Context
4949
cancel context.CancelFunc
5050
rpcServer *rpc.Server
51-
serviceMap ServiceMap
5251
acceptConn AcceptConn
5352
serveStream ServeStream
5453
Listener net.Listener
@@ -61,7 +60,6 @@ func NewServerWithServeFunc(f ServeStream) *Server {
6160
ctx: ctx,
6261
cancel: cancel,
6362
rpcServer: rpc.NewServer(),
64-
serviceMap: make(ServiceMap),
6563
acceptConn: AcceptNOConn,
6664
serveStream: f,
6765
}

sqlchain/observer/service.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import (
3131
"github.com/CovenantSQL/CovenantSQL/crypto/kms"
3232
"github.com/CovenantSQL/CovenantSQL/proto"
3333
"github.com/CovenantSQL/CovenantSQL/route"
34-
rrpc "github.com/CovenantSQL/CovenantSQL/rpc"
35-
rpc "github.com/CovenantSQL/CovenantSQL/rpc/mux"
34+
"github.com/CovenantSQL/CovenantSQL/rpc"
35+
"github.com/CovenantSQL/CovenantSQL/rpc/mux"
3636
"github.com/CovenantSQL/CovenantSQL/types"
3737
"github.com/CovenantSQL/CovenantSQL/utils"
3838
"github.com/CovenantSQL/CovenantSQL/utils/log"
@@ -99,7 +99,7 @@ type Service struct {
9999
upstreamServers sync.Map // map[proto.DatabaseID]*types.ServiceInstance
100100

101101
db *bolt.DB
102-
caller *rrpc.Caller
102+
caller *rpc.Caller
103103
stopped int32
104104
}
105105

@@ -147,7 +147,7 @@ func NewService() (service *Service, err error) {
147147
// init service
148148
service = &Service{
149149
db: db,
150-
caller: rrpc.NewCallerWithPool(rpc.GetSessionPoolInstance()),
150+
caller: rpc.NewCallerWithPool(mux.GetSessionPoolInstance()),
151151
}
152152

153153
// load previous subscriptions
@@ -411,7 +411,7 @@ func (s *Service) getUpstream(dbID proto.DatabaseID) (instance *types.ServiceIns
411411
return
412412
}
413413

414-
curBP, err := rpc.GetCurrentBP()
414+
curBP, err := mux.GetCurrentBP()
415415
if err != nil {
416416
return
417417
}

0 commit comments

Comments
 (0)