19 lines
533 B
Go
19 lines
533 B
Go
|
package mqs
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"tianyuan-api/apps/mqs/internal/config"
|
||
|
"tianyuan-api/apps/mqs/internal/mqs/apirequest"
|
||
|
"tianyuan-api/apps/mqs/internal/svc"
|
||
|
|
||
|
"github.com/zeromicro/go-queue/kq"
|
||
|
"github.com/zeromicro/go-zero/core/service"
|
||
|
)
|
||
|
|
||
|
func Consumers(c config.Config, ctx context.Context, svcContext *svc.ServiceContext) []service.Service {
|
||
|
return []service.Service{
|
||
|
kq.MustNewQueue(c.KqConsumerLog, apirequest.NewLog(ctx, svcContext)),
|
||
|
kq.MustNewQueue(c.KqConsumerCharge, apirequest.NewCharge(ctx, svcContext)),
|
||
|
}
|
||
|
}
|