Documentation ¶
Index ¶
- type GroupQueue
- type TimeQueue
- func (tq *TimeQueue) EnQueue(value interface{}, delay time.Duration)
- func (tq *TimeQueue) Len() int
- func (tq *TimeQueue) MustPersist(filename string, maxExpired int64, value interface{}, ...) *TimeQueue
- func (tq *TimeQueue) Persist(filename string, maxExpired int64, value interface{}, ...) (*TimeQueue, error)
- func (tq *TimeQueue) PersistOff() *TimeQueue
- func (tq *TimeQueue) PersistOn() *TimeQueue
- func (tq *TimeQueue) Persistent() bool
- func (tq *TimeQueue) Receive(buf int) <-chan interface{}
- func (tq *TimeQueue) SetMaxExpiredStorage(maxExpired int64)
- func (tq *TimeQueue) Traverse() <-chan interface{}
- func (tq *TimeQueue) TraverseF(f TravFunc)
- type TravFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupQueue ¶
type GroupQueue struct {
// contains filtered or unexported fields
}
type TimeQueue ¶
type TimeQueue struct {
// contains filtered or unexported fields
}
TimeQueue represents a time queue
func (*TimeQueue) EnQueue ¶
EnQueue enters time queue, stay in queue for duration delay then leave immediately, it will leave immediately if delay less or equal than 0.
func (*TimeQueue) MustPersist ¶
func (tq *TimeQueue) MustPersist(filename string, maxExpired int64, value interface{}, registry map[string]interface{}) *TimeQueue
MustPersist must enable persistence for time queue, otherwise panics if there are any error occurred
func (*TimeQueue) Persist ¶
func (tq *TimeQueue) Persist(filename string, maxExpired int64, value interface{}, registry map[string]interface{}) (*TimeQueue, error)
Persist enable persistence for time queue
func (*TimeQueue) PersistOff ¶
PersistOff turns persistence off
func (*TimeQueue) Persistent ¶
Persistent reports whether persistence is enabled
func (*TimeQueue) Receive ¶
Receive returns a received only channel, which can be used for receiving Value left from queue
func (*TimeQueue) SetMaxExpiredStorage ¶
SetMaxExpiredStorage sets maximum expired data in bytes
Click to show internal directories.
Click to hide internal directories.