pokerBet.go 614 B

1234567891011121314151617181920212223242526
  1. package mqs
  2. import (
  3. "context"
  4. "github.com/zeromicro/go-zero/core/logc"
  5. "github.com/zeromicro/go-zero/core/logx"
  6. "microGame/app/mq/cmd/kafka/internal/svc"
  7. )
  8. type PokerBet struct {
  9. ctx context.Context
  10. svcCtx *svc.ServiceContext
  11. }
  12. func NewPokerBet(ctx context.Context, svcCtx *svc.ServiceContext) *PokerBet {
  13. return &PokerBet{
  14. ctx: ctx,
  15. svcCtx: svcCtx,
  16. }
  17. }
  18. func (l *PokerBet) Consume(ctx context.Context, key, val string) error {
  19. logx.Infof("kafka consume Success key :%s , val :%s", key, val)
  20. logc.Errorf(l.ctx, "logc.Errorf kafka consume Success key :%s , val :%s", key, val)
  21. return nil
  22. }