Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_QUEUE_CAP = 4096 MAX_QUEUE_NUMBER = 4096 MAX_MESSAGE_LENGHT = 40960 )
Variables ¶
View Source
var QueueInstance map[string]QueueInterface
Functions ¶
func GetQueueLength ¶
GetLenght: return the lenght of the queue if it exists in queueInstance or -1, err
func InitQueueInstance ¶
func InitQueueInstance(dim int) map[string]QueueInterface
InitQueueInstance: init the singleton map used by the server
Types ¶
type DbQueue ¶
type DbQueue struct {
Name, Vendor, Dsn string
// contains filtered or unexported fields
}
type FsPrioQueue ¶
type PrioQueue ¶
type QueueInterface ¶
type QueueInterface interface { GetLength() (int, error) Create(string) (QueueInterface, error) Push([]byte) error Pop() ([]byte, error) // contains filtered or unexported methods }
QueueInterface: the interface type describing the operations a queue must have
func GetQueue ¶
func GetQueue(name string) QueueInterface
GetQueue: return the corresponding named queue in the QueueInstance map return nil if no queue with given name is present
Click to show internal directories.
Click to hide internal directories.