Documentation ¶
Overview ¶
some algorism
the fifo struct Note: the one fifo's max index cannot exceed the range of int32
the zk initialization
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseZkConn ¶
func CloseZkConn()
func EstablishZkConn ¶
Types ¶
type DistributedFIFO ¶
type DistributedFIFO struct {
// contains filtered or unexported fields
}
func NewFifo ¶
func NewFifo(path string, data []byte, prefix string) *DistributedFIFO
create the fifo
func (*DistributedFIFO) Poll ¶
func (this *DistributedFIFO) Poll() (res []byte)
get one data from znodes and delete the chosen znode
func (*DistributedFIFO) Put ¶
func (this *DistributedFIFO) Put(data []byte)
sequentially create a zonde
func (*DistributedFIFO) Size ¶
func (this *DistributedFIFO) Size() (int, error)
get the size of the queue
Click to show internal directories.
Click to hide internal directories.