Documentation ¶
Index ¶
- type PushService
- func (s *PushService) AddTask(ctx context.Context, bizName string) error
- func (s *PushService) GetBizStatus() map[string]bool
- func (s *PushService) Pause(ctx context.Context, bizName string) error
- func (s *PushService) PodList(ctx context.Context) ([]registry.ServiceInstance, error)
- func (s *PushService) Resume(ctx context.Context, bizName string) error
- func (s *PushService) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PushService ¶
type PushService struct {
// contains filtered or unexported fields
}
PushService 1. Post添加业务推送配置--no
- Get获取业务推送配置
- Post开始业务正常推送
- Post手动暂停业务推送
- 查保存进度
- 查业务生产的消息
- 删业务的消息队列
- 查保存进度
- 删保存进度
func NewPushService ¶
func NewPushService(notifyProducer chan<- pushconfig.PushConfig, interceptor *interceptor.Interceptor, producerRepo repository.ProducerRepository, consumerRepo repository2.ConsumerRepository, register registry.Registry, shutdownCh chan os.Signal, ) *PushService
func (*PushService) AddTask ¶
func (s *PushService) AddTask(ctx context.Context, bizName string) error
AddTask 开始执行某个业务的推送任务[开始生产-消费]
func (*PushService) GetBizStatus ¶
func (s *PushService) GetBizStatus() map[string]bool
func (*PushService) Pause ¶
func (s *PushService) Pause(ctx context.Context, bizName string) error
Pause 暂停某个业务推送,生产者;已经在生产的会正常生产完毕,消息存起来;之后到了指定生产时间收到了会收到cron信号,但不会开始生产;人工AddTask也不会生效 消费者:正在消费的正常退出,不需要写回遗留任务;再来新的消费任务也会拒绝。
func (*PushService) PodList ¶
func (s *PushService) PodList(ctx context.Context) ([]registry.ServiceInstance, error)
func (*PushService) Resume ¶
func (s *PushService) Resume(ctx context.Context, bizName string) error
Resume 恢复某个业务推送
func (*PushService) Shutdown ¶
func (s *PushService) Shutdown()
Click to show internal directories.
Click to hide internal directories.