commit | d259ccfb6f5efc3b64e5503edd3284de4a2b4068 | [log] [tgz] |
---|---|---|
author | Alex Fandrianto <alexfandrianto@google.com> | Wed Jun 15 14:39:41 2016 -0700 |
committer | Alex Fandrianto <alexfandrianto@google.com> | Wed Jun 15 14:43:40 2016 -0700 |
tree | f73f5e73ab0c0795663975c877382248992a0154 | |
parent | 4ff57097b64178cf9239b6d0841f80d611ee73db [diff] |
x/ref: Implement ListenForPeers This CL does the following things. 1. modify the underlying queue implementation - It now handles both Peer and Invite through the copyable interface. - copyable introduces the concept of a "lost" invite or peer. - When the copyable is removed from the queue, a "lost" version is inserted in its stead. - "lost" elements are only visible to cursors that have seen the corresponding found elements. - "lost" elements remain within the queue, and thus affect its "size". - Garbage collection of the "lost" elements occurs once everybody qualified to see the element has seen it via "next" OR has canceled and unregistered themselves from the queue. - Tests adjusted to take into account "lost" updates. New tests added to take into account "lost" update garbage collection. 2. ListenForPeers is updated. - Tests remain the same; it ignores the "lost" Invites. 3. ListenForInvites was added. - Tests added by mocking out discovery. Change-Id: I2ba36a59621a7e13d16dc722610c34d2f2a835b8
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.