Пример #1
0
func NewClientQueue(conn *net.UDPConn, cache *cache.Cache, sq *Sq) *Cq {
	cq := &Cq{conn: conn, cache: cache, sq: sq, inflight: make(map[string][]chan bool, 0)}
	cache.RegisterPutCallback(cq.handlePutCallback)
	return cq
}
Пример #2
0
func NewServerQueue(nc *cache.Cache) *Sq {
	sq := &Sq{}
	nc.RegisterVeritfyCallback(sq.handleVerifyCallback)
	return sq
}