server
This commit is contained in:
@@ -20,7 +20,7 @@ type IService interface {
|
||||
|
||||
type Base struct {
|
||||
Target string
|
||||
SID string
|
||||
SID int64
|
||||
Serve *grpc.Server
|
||||
EtcdTTL int64
|
||||
OnInit func(serve *grpc.Server)
|
||||
@@ -32,7 +32,7 @@ type Base struct {
|
||||
func (s *Base) Init(addr string, port int) {
|
||||
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