This commit is contained in:
孟帅
2023-05-10 23:54:50 +08:00
parent bbe655a4d8
commit 49a96750bf
314 changed files with 15138 additions and 6244 deletions

View File

@@ -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
},
}