Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EverythingMe/go-disque
/ functions
Functions
85 in github.com/EverythingMe/go-disque
⨍
Functions
85
◇
Types & classes
17
↓ 20 callers
Method
Close
Close closes the underlying connection
disque/disque.go:86
↓ 15 callers
Method
Add
Add sents an ADDJOB command to disque, as specified by the AddRequest. Returns the job id or an error
disque/disque.go:61
↓ 12 callers
Method
Get
Get gets one job from any of the given queues, or times out if timeout has elapsed without a job being available. Returns a job or an error
disque/disque.go:67
↓ 11 callers
Method
Do
Execute the task on the client
tasque/tasque.go:64
↓ 10 callers
Method
Get
Get returns a client, or an error if we could not init one
disque/pool.go:168
↓ 9 callers
Method
Id
()
tasque/tasque.go:76
↓ 7 callers
Function
NewPool
NewPool creates a new client pool, with a given redis dial function, and an initial list of ip:port addresses to try connecting to. You should call Re
disque/pool.go:68
↓ 5 callers
Method
Size
()
disque/pool.go:54
↓ 5 callers
Function
scopedLock
(m *sync.Mutex)
disque/pool.go:84
↓ 4 callers
Function
NewChan
NewChan creates a new disque channel objec with a given name, over a disque cluster with the given addrs. If async is true, messages are sent using di
disqchan/disqchan.go:49
↓ 4 callers
Method
RefreshNodes
RefreshNodes uses a HELLO call to refresh the node list in the cluster
disque/pool.go:201
↓ 4 callers
Method
SendChan
SendChan returns a channel to which objects can be sent
disqchan/disqchan.go:84
↓ 4 callers
Method
Set
Set a property in the task
tasque/tasque.go:45
↓ 3 callers
Method
Ack
Ack sends and ACKJOB command with the given job ids
disque/disque.go:73
↓ 3 callers
Method
Handle
Register a task handler in the worker. This shoudl
tasque/worker.go:46
↓ 3 callers
Method
RecvChan
RecvChan returns a channel from which received messages can be received. Before it is called, this Chan is not receiving from the queue
disqchan/disqchan.go:99
↓ 3 callers
Method
Run
Run starts the worker and makes it request jobs
tasque/worker.go:115
↓ 3 callers
Method
RunRefreshLoop
RunRefreshLoop starts a goroutine that periodically refreshes the node list using HELLO
disque/pool.go:219
↓ 3 callers
Method
Stop
Stop stop the chan's internal send/receive loops
disqchan/disqchan.go:70
↓ 3 callers
Method
selectNode
selectNode select a valid node by random. Currently only nodes with priority 1 are selected
disque/pool.go:97
↓ 2 callers
Method
Do
Do puts the task in the queue for immediate execution, and set the task's jobId
tasque/client.go:41
↓ 2 callers
Function
FuncHandler
FuncHandler takes a func and its id and converts them into a FuncTaskHandler
tasque/tasque.go:96
↓ 2 callers
Method
Hello
Hello is a handshake request with the server, returns a description of the cluster state
disque/disque.go:83
↓ 2 callers
Method
JobId
JobId The task's jobId
tasque/tasque.go:28
↓ 2 callers
Function
NewClient
Create a new client for the given disque addrs. enqueueTimeout is the amount of time after which we fail
tasque/client.go:20
↓ 2 callers
Function
NewTask
Create a new task with a given id
tasque/tasque.go:37
↓ 2 callers
Function
NewWorker
Create a new worker that runs numGoroutines concurrently, connecting to disque addrs
tasque/worker.go:26
↓ 2 callers
Method
Qlen
Qlen returns the length of a given queue
disque/disque.go:80
↓ 2 callers
Method
UpdateNodes
UpdateNodes explicitly sets the nodes of the pool
disque/pool.go:195
↓ 2 callers
Function
addArgs
builds ADDJOB args
disque/disque.go:130
↓ 2 callers
Function
qname
(tname string)
tasque/client.go:36
↓ 1 callers
Method
AddMulti
AddMulti sends multiple ADDJOB in pipeline
disque/disque.go:64
↓ 1 callers
Method
Close
Close closes all pools
disque/pool.go:155
↓ 1 callers
Method
Delay
Delay puts the task in the queue for execution after the delay period of time. This also sets the jobId of the task
tasque/client.go:47
↓ 1 callers
Method
GetMulti
GetMulti gets <count> jobs from the given queues, or times out if timeout has elapsed without enough jobs being available. Returns a list of jobs or a
disque/disque.go:176
↓ 1 callers
Method
Handle
(*Task)
tasque/tasque.go:75
↓ 1 callers
Function
NewCrawlHandler
(persistDir string, addrs ...string)
disqrawl/crawler.go:28
↓ 1 callers
Method
contains
(n Node)
disque/pool.go:17
↓ 1 callers
Method
crawl
(u string)
disqrawl/crawler.go:56
↓ 1 callers
Function
crawlManager
(nodes []string)
disqrawl/crawler.go:145
↓ 1 callers
Method
getHandler
(t *Task)
tasque/worker.go:59
↓ 1 callers
Method
getPool
getPool returns a redis connection pool for a given address
disque/pool.go:126
↓ 1 callers
Method
handlerLoop
a single worker loop
tasque/worker.go:82
↓ 1 callers
Method
marshal
()
tasque/tasque.go:32
↓ 1 callers
Method
receiveLoop
()
disqchan/disqchan.go:113
↓ 1 callers
Method
runHandler
runHandler safely wraps running a single task in a handler
tasque/worker.go:67
↓ 1 callers
Method
seen
(u *url.URL)
disqrawl/crawler.go:41
↓ 1 callers
Method
sendLoop
()
disqchan/disqchan.go:167
Method
Ack
Ack sends and ACKJOB command with the given job ids
disque/disque.go:221
Method
Add
Add sents an ADDJOB command to disque, as specified by the AddRequest. Returns the job id or an error
disque/disque.go:101
Method
AddMulti
AddMulti sends multiple ADDJOB in pipeline
disque/disque.go:112
Function
BenchmarkAdd
(b *testing.B)
disque/disque_test.go:265
Method
Close
Close closes the underlying connection
disque/disque.go:96
Method
Delay
Delay executes the task, delayed for d duration
tasque/tasque.go:69
Method
Enqueue
Enqueue an already existing job by jobId. This can be used for fast retries
disque/disque.go:250
Function
Example
()
tasque/tasque_test.go:77
Function
ExampleClient
()
disque/disque_test.go:85
Function
ExampleRecv
()
disqchan/disqchan_test.go:68
Function
ExampleSend
()
disqchan/disqchan_test.go:55
Method
FastAck
FastAck sends a FASTACK commadn with the given job ids. See the disque docs about the difference between ACK and FASTACK
disque/disque.go:77
Method
FastAck
FastAck sends a FASTACK commadn with the given job ids. See the disque docs about the difference between ACK and FASTACK
disque/disque.go:233
Method
Get
Get gets one job from any of the given queues, or times out if timeout has elapsed without a job being available. Returns a job or an error
disque/disque.go:161
Method
GetMulti
GetMulti gets <count> jobs from the given queues, or times out if timeout has elapsed without enough jobs being available. Returns a job or an error
disque/disque.go:70
Method
Handle
Handle calls the underlying func to handle the task
tasque/tasque.go:86
Method
Handle
(t *tasque.Task)
disqrawl/crawler.go:120
Method
Hello
Hello is a handshake request with the server, returns a description of the cluster state TODO: implement this
disque/disque.go:262
Method
Id
Id returns the job id. the underlying id is only settable by the client, so there is only a getter for it
disque/disque.go:27
Method
Id
Id returns the id of the handler
tasque/tasque.go:91
Method
Id
()
disqrawl/crawler.go:37
Method
IsNull
IsNull checks if a node is empty or not
disque/pool.go:35
Method
Name
Name returns the name of the chan
disqchan/disqchan.go:33
Method
Qlen
Qlen returns the length of a given queue
disque/disque.go:243
Method
SetRetry
Set the retry timeout. This must be greater than 1. If the worker does not ACK the task in this timeout, disque will try to re-queue it
tasque/tasque.go:58
Method
SetTTL
Set the task TTL - if it will not succeed after this time, disque will give up on it
tasque/tasque.go:51
Method
Stop
Stop stops the worker from processing new tasks
tasque/worker.go:109
Function
TestAddJob
(t *testing.T)
disque/disque_test.go:19
Function
TestAddMulti
(t *testing.T)
disque/disque_test.go:55
Function
TestChan
(t *testing.T)
disqchan/disqchan_test.go:9
Function
TestClient
(t *testing.T)
disque/disque_test.go:208
Function
TestHello
(t *testing.T)
disque/disque_test.go:149
Function
TestPool
(t *testing.T)
disque/disque_test.go:122
Function
TestTasque
(t *testing.T)
tasque/tasque_test.go:26
Function
dial
(addr string)
disqchan/disqchan.go:37
Function
dial
(addr string)
disque/disque_test.go:15
Function
main
()
disqrawl/crawler.go:173