Documentation
¶
Index ¶
- Constants
- func CtxPQueues(entry interface{}, ctx context.Context) context.Context
- type ItemStatus
- type PQueues
- type PriorityQueue
- func (pq *PriorityQueue) FixIndexesInPQueue()
- func (pq *PriorityQueue) Len() int
- func (pq *PriorityQueue) Less(i, j int) bool
- func (pq *PriorityQueue) Pop() interface{}
- func (pq *PriorityQueue) ProcessQueue(requestLimit int64, timeLimit time.Duration, stop chan struct{})
- func (pq *PriorityQueue) Push(x interface{})
- func (pq *PriorityQueue) RemoveById(id string) error
- func (pq *PriorityQueue) Swap(i, j int)
- func (pq *PriorityQueue) WaitUntilInvoked(id string) (*QueueItem, error)
- type PriorityQueueInterface
- type QueueItem
- type Response
Constants ¶
View Source
const ( PROCESSING ItemStatus = "in progress" INVOKED ItemStatus = "invoked" HighPriority = 10 NormalPriority = 5 LowPriority = 0 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ItemStatus ¶
type ItemStatus string
type PQueues ¶
type PQueues struct { SuperUserPQueue *PriorityQueue UserPQueue *PriorityQueue }
func NewPQueues ¶
func NewPQueues() PQueues
func PQueuesInstance ¶
type PriorityQueue ¶
type PriorityQueue struct {
// contains filtered or unexported fields
}
func (*PriorityQueue) FixIndexesInPQueue ¶
func (pq *PriorityQueue) FixIndexesInPQueue()
func (*PriorityQueue) Len ¶
func (pq *PriorityQueue) Len() int
func (*PriorityQueue) Less ¶
func (pq *PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) ProcessQueue ¶
func (pq *PriorityQueue) ProcessQueue(requestLimit int64, timeLimit time.Duration, stop chan struct{})
func (*PriorityQueue) Push ¶
func (pq *PriorityQueue) Push(x interface{})
func (*PriorityQueue) RemoveById ¶
func (pq *PriorityQueue) RemoveById(id string) error
func (*PriorityQueue) Swap ¶
func (pq *PriorityQueue) Swap(i, j int)
func (*PriorityQueue) WaitUntilInvoked ¶
func (pq *PriorityQueue) WaitUntilInvoked(id string) (*QueueItem, error)
type PriorityQueueInterface ¶
type PriorityQueueInterface interface { WaitUntilInvoked(id string) (*QueueItem, error) ProcessQueue(requestLimit int64, timeLimit time.Duration, stop chan struct{}) }
func NewPriorityQueue ¶
func NewPriorityQueue() PriorityQueueInterface
Click to show internal directories.
Click to hide internal directories.