Documentation ¶
Index ¶
- Constants
- func LoadQueues(rq *RQ) (err error)
- func RedisKeyFromQueueID(qid QueueID) string
- type CallByQueueID
- type FuncWithQueueID
- type IdxQueue
- type Queue
- func (queue *Queue) Clear() (result Result, err error)
- func (queue *Queue) Dequeuing() int64
- func (queue *Queue) Get() (result Result, err error)
- func (queue *Queue) Idle() bool
- func (queue *Queue) Info() (result Result, err error)
- func (queue *Queue) Put(request *Request) (Result, error)
- func (queue *Queue) QueueSize() int64
- func (queue *Queue) Queuing() int64
- func (queue *Queue) SetStatus(status QueueStatus) (result Result, err error)
- func (queue *Queue) Status() QueueStatus
- func (queue *Queue) Sync(lock bool) (result Result, err error)
- func (queue *Queue) View(start int64, end int64) (result Result, err error)
- type QueueBox
- func (box *QueueBox) AddQueue(qid QueueID) (queue *IdxQueue, err error)
- func (box *QueueBox) GetQueue(qid QueueID) (*IdxQueue, bool)
- func (box *QueueBox) Info() (result Result)
- func (box *QueueBox) OrderedQueues(k int64, start int64, status QueueStatus) Result
- func (box *QueueBox) QueueNum(status QueueStatus) int
- func (box *QueueBox) RandomQueues(k int64, status QueueStatus) Result
- func (box *QueueBox) RemoveQueue(qid QueueID) error
- func (box *QueueBox) UpdateQueueStatus(qid QueueID, status QueueStatus) (result Result, err error)
- type QueueID
- type QueueNotExistError
- type QueueOperation
- type QueueStatus
- type RQ
- func (rq *RQ) AddRequest(rawReq *RawRequest) (result Result, err error)
- func (rq *RQ) ClearQueue(qid QueueID) (Result, error)
- func (rq *RQ) DeleteQueue(qid QueueID) (Result, error)
- func (rq *RQ) ForceSyncQueue(qid QueueID) (result Result, err error)
- func (rq *RQ) GetRequest(qid QueueID) (result Result, err error)
- func (rq *RQ) Info() (result Result, err error)
- func (rq *RQ) OrderedQueues(k int64, start int64, status QueueStatus) Result
- func (rq *RQ) Pause() (Result, error)
- func (rq *RQ) PauseQueue(qid QueueID) (result Result, err error)
- func (rq *RQ) QueueInfo(qid QueueID) (Result, error)
- func (rq *RQ) RandomQueues(k int64, status QueueStatus) Result
- func (rq *RQ) Resume() (Result, error)
- func (rq *RQ) ResumeQueue(qid QueueID) (result Result, err error)
- func (rq *RQ) SyncQueue(qid QueueID) (result Result, err error)
- func (rq *RQ) ViewQueue(qid QueueID, start int64, end int64) (result Result, err error)
- type RQStats
- type RQStatus
- type RawRequest
- type Request
- type Result
- type UnavailableError
- type ViewQueue
Constants ¶
View Source
const QueueNotExist = QueueNotExistError("")
QueueNotExist TODO
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallByQueueID ¶
type CallByQueueID struct {
// contains filtered or unexported fields
}
CallByQueueID TODO
func NewCallByQueueIDOperation ¶
func NewCallByQueueIDOperation(rq *RQ, f FuncWithQueueID) *CallByQueueID
NewCallByQueueIDOperation TODO
type IdxQueue ¶
IdxQueue TODO
func NewIdxQueue ¶
func NewIdxQueue(rq *RQ, qid QueueID, status QueueStatus, idx int) *IdxQueue
NewIdxQueue TODO
type Queue ¶
type Queue struct { ID QueueID // contains filtered or unexported fields }
Queue TODO
type QueueBox ¶
type QueueBox struct {
// contains filtered or unexported fields
}
QueueBox TODO
func (*QueueBox) OrderedQueues ¶
func (box *QueueBox) OrderedQueues(k int64, start int64, status QueueStatus) Result
OrderedQueues TODO
func (*QueueBox) RandomQueues ¶
func (box *QueueBox) RandomQueues(k int64, status QueueStatus) Result
RandomQueues TODO
func (*QueueBox) UpdateQueueStatus ¶
func (box *QueueBox) UpdateQueueStatus(qid QueueID, status QueueStatus) (result Result, err error)
UpdateQueueStatus TODO
type QueueID ¶
type QueueID struct { Host string `json:"host"` Port string `json:"port"` Scheme string `json:"scheme"` }
QueueID TODO
func QueueIDFromRedisKey ¶
QueueIDFromRedisKey TODO
type QueueNotExistError ¶
type QueueNotExistError string
QueueNotExistError TODO
func (QueueNotExistError) Error ¶
func (e QueueNotExistError) Error() string
type QueueOperation ¶
QueueOperation TODO
type QueueStatus ¶
type QueueStatus string
QueueStatus type
const ( QueueNilStatus QueueStatus = "nil" QueueWorking QueueStatus = "working" QueuePaused QueueStatus = "paused" )
QueueStatus enum
type RQ ¶
type RQ struct { Conf *viper.Viper Client *redis.Client Process *process.Process // contains filtered or unexported fields }
RQ TODO
func (*RQ) AddRequest ¶
func (rq *RQ) AddRequest(rawReq *RawRequest) (result Result, err error)
AddRequest TODO
func (*RQ) ForceSyncQueue ¶
ForceSyncQueue TODO
func (*RQ) GetRequest ¶
GetRequest TODO
func (*RQ) OrderedQueues ¶
func (rq *RQ) OrderedQueues(k int64, start int64, status QueueStatus) Result
OrderedQueues TODO
func (*RQ) PauseQueue ¶
PauseQueue TODO
func (*RQ) RandomQueues ¶
func (rq *RQ) RandomQueues(k int64, status QueueStatus) Result
RandomQueues TODO
func (*RQ) ResumeQueue ¶
ResumeQueue TODO
type RQStats ¶
type RQStats struct {
// contains filtered or unexported fields
}
RQStats TODO
func (*RQStats) IncrRequestNum ¶
IncrRequestNum TODO
type RawRequest ¶
type RawRequest struct { URL string `json:"url" binding:"required"` Method string `json:"method,omitempty"` Meta map[string]interface{} `json:"meta,omitempty"` Headers map[string]string `json:"headers,omitempty"` Cookies map[string]string `json:"cookies,omitempty"` Body []byte `json:"body,omitempty"` Encoding string `json:"encoding,omitempty"` }
RawRequest TODO
type UnavailableError ¶
type UnavailableError string
UnavailableError TODO
func (UnavailableError) Error ¶
func (e UnavailableError) Error() string
Click to show internal directories.
Click to hide internal directories.