feat sn 改成 int64
This commit is contained in:
@@ -25,7 +25,7 @@ type IService interface {
|
||||
type Base struct {
|
||||
Target string
|
||||
ServiceName string
|
||||
SID string
|
||||
SID int64
|
||||
Serve *grpc.Server
|
||||
Cfg *config.GrpcConfig
|
||||
OnCustomGrpcServerOption func() []grpc.ServerOption
|
||||
@@ -39,7 +39,7 @@ type Base struct {
|
||||
func (s *Base) Init(ready *sync.WaitGroup) {
|
||||
s.wg = &sync.WaitGroup{}
|
||||
s.wg.Add(1)
|
||||
s.SID = utils.SnowflakeInstance().Generate().String()
|
||||
s.SID = utils.SnowflakeInstance().Generate().Int64()
|
||||
go func() {
|
||||
defer s.wg.Done()
|
||||
defer s.OnClose()
|
||||
|
||||
Reference in New Issue
Block a user