feat usn sid 改成string

This commit is contained in:
2026-01-10 16:02:23 +08:00
parent e209ec64af
commit 8c6614578b
11 changed files with 43 additions and 49 deletions

View File

@@ -22,7 +22,7 @@ type IService interface {
type Base struct {
Target string
SID int64
SID string
Serve *grpc.Server
EtcdTTL int64
OnInit func(serve *grpc.Server)
@@ -34,7 +34,7 @@ type Base struct {
func (s *Base) Init(addr string, port int32) {
s.wg = &sync.WaitGroup{}
s.wg.Add(1)
s.SID = utils.SnowflakeInstance().Generate().Int64()
s.SID = utils.SnowflakeInstance().Generate().String()
go func() {
defer s.wg.Done()
defer s.OnClose()