rpc: fix megacheck warnings

This commit is contained in:
Egon Elbre
2017-08-08 12:08:37 +03:00
committed by Felix Lange
parent 43437806fb
commit e063d538b8
5 changed files with 24 additions and 62 deletions

View File

@ -48,7 +48,6 @@ type callback struct {
// service represents a registered object
type service struct {
name string // name for service
rcvr reflect.Value // receiver of methods for the service
typ reflect.Type // receiver type
callbacks callbacks // registered handlers
subscriptions subscriptions // available subscriptions/notifications
@ -58,23 +57,19 @@ type service struct {
type serverRequest struct {
id interface{}
svcname string
rcvr reflect.Value
callb *callback
args []reflect.Value
isUnsubscribe bool
err Error
}
type serviceRegistry map[string]*service // collection of services
type callbacks map[string]*callback // collection of RPC callbacks
type subscriptions map[string]*callback // collection of subscription callbacks
type subscriptionRegistry map[string]*callback // collection of subscription callbacks
type serviceRegistry map[string]*service // collection of services
type callbacks map[string]*callback // collection of RPC callbacks
type subscriptions map[string]*callback // collection of subscription callbacks
// Server represents a RPC server
type Server struct {
services serviceRegistry
muSubcriptions sync.Mutex // protects subscriptions
subscriptions subscriptionRegistry
services serviceRegistry
run int32
codecsMu sync.Mutex