Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶ added in v1.1.0
func (*Notifier) AddInNotifyQueue ¶
func (n *Notifier) AddInNotifyQueue(event *plugnmeet.CommonNotifyEvent, apiKey, apiSecret string, urls []string)
func (*Notifier) Kill ¶ added in v1.1.0
func (n *Notifier) Kill()
Kill stops the worker immediately, dropping any unprocessed items in the queue.
func (*Notifier) StopGracefully ¶ added in v1.1.0
func (n *Notifier) StopGracefully()
StopGracefully waits for all queued items to be processed before stopping.
type SimpleQueueWorker ¶ added in v1.1.0
type SimpleQueueWorker struct {
// contains filtered or unexported fields
}
SimpleQueueWorker provides a basic job queue with a single worker goroutine.
func NewSimpleQueueWorker ¶ added in v1.1.0
func NewSimpleQueueWorker(ctx context.Context, queueSize int, logger *logrus.Entry) *SimpleQueueWorker
NewSimpleQueueWorker creates and starts a new queue worker.
func (*SimpleQueueWorker) Kill ¶ added in v1.1.0
func (qw *SimpleQueueWorker) Kill()
Kill stops the worker immediately, dropping any unprocessed jobs in the queue.
func (*SimpleQueueWorker) StopGracefully ¶ added in v1.1.0
func (qw *SimpleQueueWorker) StopGracefully()
StopGracefully waits for all queued jobs to be processed before stopping the worker.
func (*SimpleQueueWorker) Submit ¶ added in v1.1.0
func (qw *SimpleQueueWorker) Submit(job func())
Submit adds a job to the queue. It will drop the job if the queue is full.
Click to show internal directories.
Click to hide internal directories.