mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-11 03:33:53 +08:00
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
// Package cmd
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
package cmd
|
||||
|
||||
import (
|
||||
@@ -13,11 +18,11 @@ var (
|
||||
Brief: "系统授权,当为第三方客户开发应用项目不想将源码和可执行文件让其随意使用时,可以通过授权的方式约束使用方。",
|
||||
Description: `目前已实现,一对一、一对多、有效期授权,具体使用可以参考现有逻辑结合实际场景进行改造`,
|
||||
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
|
||||
service.TCPAuth().Start(ctx)
|
||||
service.AuthClient().Start(ctx)
|
||||
|
||||
// 退出信号监听
|
||||
signalListen(ctx, func(sig os.Signal) {
|
||||
service.TCPAuth().Stop(ctx)
|
||||
service.AuthClient().Stop(ctx)
|
||||
})
|
||||
|
||||
// 信号监听
|
||||
@@ -26,7 +31,6 @@ var (
|
||||
case <-serverCloseSignal:
|
||||
// ...
|
||||
}
|
||||
|
||||
return
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user