service

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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

  1. Get获取业务推送配置
  2. Post开始业务正常推送
  3. Post手动暂停业务推送
  4. 查保存进度
  5. 查业务生产的消息
  6. 删业务的消息队列
  7. 查保存进度
  8. 删保存进度

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 (*PushService) Resume

func (s *PushService) Resume(ctx context.Context, bizName string) error

Resume 恢复某个业务推送

func (*PushService) Shutdown

func (s *PushService) Shutdown()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL