28 lines
599 B
Go
Raw Normal View History

2025-02-05 18:45:49 +08:00
package logic
import (
"context"
2025-02-14 10:30:15 +08:00
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ranking/internal/svc"
"gitea.youtukeji.com.cn/youtu/youtu_grpc/app/ranking/ranking"
2025-02-05 18:45:49 +08:00
"github.com/zeromicro/go-zero/core/logx"
)
type PingLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
return &PingLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
2025-02-14 10:30:15 +08:00
func (l *PingLogic) Ping(in *ranking.Request) (*ranking.Response, error) {
return &ranking.Response{Pong: in.Ping}, nil
2025-02-05 18:45:49 +08:00
}