All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 53s
32 lines
622 B
Go
32 lines
622 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.cialloo.com/CiallooWeb/Blog/app/internal/svc"
|
|
"git.cialloo.com/CiallooWeb/Blog/app/internal/types"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type PingLogic struct {
|
|
logx.Logger
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
}
|
|
|
|
// Ping the server to check if it's alive
|
|
func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
|
|
return &PingLogic{
|
|
Logger: logx.WithContext(ctx),
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (l *PingLogic) Ping(req *types.PingReq) (resp *types.PingResp, err error) {
|
|
return &types.PingResp{
|
|
OK: true,
|
|
}, nil
|
|
}
|