Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HeartbeatInterval is the interval that broker and worker send // heartbeats to each other. HeartbeatInterval = time.Second // HeartbeatLiveness defines the liveness of each heartbeat. Generally // it should be >= 3, otherwise workers will keep being discarded and // reconnecting. HeartbeatLiveness = 3 )
View Source
const ( // Ready is sent by worker to signal broker that it is ready to receive // jobs. Ready = "\001" // Heartbeat is sent by both broker and worker to signal a heartbeat. Heartbeat = "\002" // Shutdown is sent by worker while being killed (probably by CTRL C). // It is an addition to original PPP to shorten the time needed for // broker to detect a normal shutdown of worker. Shutdown = "\003" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker implements the Paranoid Pirate queue described in the zguide: http://zguide.zeromq.org/py:all#Robust-Reliable-Queuing-Paranoid-Pirate-Pattern with the addition of:
- Shutdown signal, which signifies a normal termination of worker to provide a fast path of worker removal
NOTE(limouren): it might make a good interface
Click to show internal directories.
Click to hide internal directories.