rpc/rpc.go

34 lines
604 B
Go
Raw Normal View History

2022-06-29 15:25:35 +08:00
// Package rpc ...
//
// Description : rpc ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2022-06-29 15:21
package rpc
import (
"sync"
"go.uber.org/zap"
)
// InitRPC 初始化RPC服务
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 15:23 2022/6/29
func InitRPC(serviceTable map[string]Service, loggerInstance *zap.Logger) *request {
return &request{
logger: loggerInstance,
serviceTable: serviceTable,
lock: &sync.RWMutex{},
}
}
type request struct {
logger *zap.Logger
serviceTable map[string]Service
lock *sync.RWMutex
}