Documentation
¶
Index ¶
- Variables
- func MustNewMinuteWindow() *average.SlidingWindow
- func QueueIDFromRedisKey(key string) (qid sth.QueueID, err error)
- func QueueIDFromString(key string) (qid sth.QueueID, err error)
- func RedisKeyFromQueueID(qid sth.QueueID) string
- func WindowTotal(window *average.SlidingWindow, second time.Duration) int64
- type CallByQueue
- type Queue
- func (queue *Queue) Clear(erase bool) (result sth.Result, err error)
- func (queue *Queue) Dequeuing() int64
- func (queue *Queue) ID() sth.QueueID
- func (queue *Queue) Info() sth.Result
- func (queue *Queue) ItemID() uint64
- func (queue *Queue) Pop() (req *request.Request, qsize int64, err error)
- func (queue *Queue) Push(request *request.Request) (result sth.Result, err error)
- func (queue *Queue) QueueSize() int64
- func (queue *Queue) Queuing() int64
- func (queue *Queue) SetStatus(newStatus QueueStatus) (err error)
- func (queue *Queue) Status() QueueStatus
- func (queue *Queue) Sync() (result sth.Result, err error)
- func (queue *Queue) View(start int64, end int64) (result sth.Result, err error)
- type QueueBox
- func (box *QueueBox) ClearQueue(qid sth.QueueID) (sth.Result, error)
- func (box *QueueBox) DeleteQueue(qid sth.QueueID) (sth.Result, error)
- func (box *QueueBox) Info() (result sth.Result)
- func (box *QueueBox) Load() (err error)
- func (box *QueueBox) OnStart(context.Context) error
- func (box *QueueBox) OnStop(context.Context) error
- func (box *QueueBox) PauseQueue(qid sth.QueueID) (sth.Result, error)
- func (box *QueueBox) PopRequest(qid sth.QueueID) (req *request.Request, err error)
- func (box *QueueBox) PushRequest(req *request.Request) (result sth.Result, err error)
- func (box *QueueBox) QueueInfo(qid sth.QueueID) (sth.Result, error)
- func (box *QueueBox) Queues(k int) sth.Result
- func (box *QueueBox) ResumeQueue(qid sth.QueueID) (sth.Result, error)
- func (box *QueueBox) SetStatus(qid sth.QueueID, newStatus QueueStatus) (sth.Result, error)
- func (box *QueueBox) Stats() *Stats
- func (box *QueueBox) SyncQueue(qid sth.QueueID, force bool) (result sth.Result, err error)
- func (box *QueueBox) ViewQueue(qid sth.QueueID, start int64, end int64) (result sth.Result, err error)
- func (box *QueueBox) ViewQueues(k int, start int, status QueueStatus) sth.Result
- type QueueStatus
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var QueueStatusList = []QueueStatus{Working, Paused}
QueueStatusList TODO
View Source
var QueueStatusMap = map[string]QueueStatus{ utils.Text(Working): Working, utils.Text(Paused): Paused, }
QueueStatusMap TODO
Functions ¶
func MustNewMinuteWindow ¶
func MustNewMinuteWindow() *average.SlidingWindow
MustNewMinuteWindow TODO
func QueueIDFromRedisKey ¶
QueueIDFromRedisKey TODO
func QueueIDFromString ¶
QueueIDFromString TODO
func RedisKeyFromQueueID ¶
RedisKeyFromQueueID TODO
func WindowTotal ¶
func WindowTotal(window *average.SlidingWindow, second time.Duration) int64
WindowTotal TODO
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue TODO
func (*Queue) SetStatus ¶
func (queue *Queue) SetStatus(newStatus QueueStatus) (err error)
SetStatus TODO
type QueueBox ¶
QueueBox TODO
func New ¶
func New(serv *serv.Serv, client *redis.Client, reqWrapper *reqwrap.RequestWrapper) *QueueBox
New TODO
func (*QueueBox) ClearQueue ¶
ClearQueue TODO
func (*QueueBox) DeleteQueue ¶
DeleteQueue TODO
func (*QueueBox) PauseQueue ¶
PauseQueue TODO
func (*QueueBox) PopRequest ¶
PopRequest TODO
func (*QueueBox) PushRequest ¶
PushRequest TODO
func (*QueueBox) ResumeQueue ¶
ResumeQueue TODO
func (*QueueBox) ViewQueue ¶
func (box *QueueBox) ViewQueue(qid sth.QueueID, start int64, end int64) (result sth.Result, err error)
ViewQueue TODO
func (*QueueBox) ViewQueues ¶
ViewQueues TODO
type QueueStatus ¶
type QueueStatus int
QueueStatus TODO
const ( Working QueueStatus // working Paused // paused )
QueueStatus enum
func (QueueStatus) MarshalJSON ¶
func (s QueueStatus) MarshalJSON() ([]byte, error)
MarshalJSON TODO
func (QueueStatus) String ¶
func (i QueueStatus) String() string
func (*QueueStatus) UnmarshalJSON ¶
func (s *QueueStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
Stats TODO
func (*Stats) IncrRequestNum ¶
IncrRequestNum TODO
Click to show internal directories.
Click to hide internal directories.