You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
701 B
Go

package producer
import (
"context"
"joybuywork/internal/service/queue/types"
)
type DeepworkNotify struct {
ctx context.Context
topic string
}
func NewDeepworkNotify(ctx context.Context) DeepworkNotify {
return DeepworkNotify{
ctx: ctx,
topic: types.DeepworkNotifyTopic,
}
}
func (p DeepworkNotify) CampaignStart(data types.DnCampaignStart) {
_ = AP.Produce(p.ctx, p.topic, types.DnCampaignStartKey, data)
}
func (p DeepworkNotify) CampaignEnd(data types.DnCampaignEnd) {
_ = AP.Produce(p.ctx, p.topic, types.DnCampaignEndKey, data)
}
func (p DeepworkNotify) RewardPushStatus(data types.DnRewardPushStatus) {
_ = AP.Produce(p.ctx, p.topic, types.DnRewardPushStatusKey, data)
}