feat: import services and standardize Go 1.26.5
This commit is contained in:
32
apps/base/initial/internal/logic/check/hello.go
Normal file
32
apps/base/initial/internal/logic/check/hello.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package check
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
pb "git.apinb.com/bsm-apps/initial/pb"
|
||||
"git.apinb.com/bsm-sdk/core/vars"
|
||||
)
|
||||
|
||||
// HELLO - 健康检查接口
|
||||
func Hello(ctx context.Context, in *pb.Crc) (reply *pb.StatusReply, err error) {
|
||||
// 输入验证
|
||||
if in.Code != "" {
|
||||
return &pb.StatusReply{
|
||||
Code: 0,
|
||||
Message: vars.OK,
|
||||
Details: "Hello " + in.Code,
|
||||
Timeseq: time.Now().Unix(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// 可以在这里添加更多的健康检查逻辑
|
||||
// 例如检查数据库连接、Redis连接等
|
||||
|
||||
return &pb.StatusReply{
|
||||
Code: 0,
|
||||
Message: vars.OK,
|
||||
Details: "",
|
||||
Timeseq: time.Now().Unix(),
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user