• Iustin Pop's avatar
    ConfdClient: add synchronous wait for replies mode · bfbbc223
    Iustin Pop authored
    
    
    Currently, there is no way for a user of the confd client library to
    know how many replies there should be, whether all have been received,
    etc. This is bad since we can't reliably detect the consistency of the
    results.
    
    This patch attempts to fix this by adding a synchronous WaitForReply
    function that will wait until either a timeout expires, or until a
    minimum number of replies have been received (interested users should
    add similar functionality for the async case). The callback
    functionality will still do call-backs into the user-provided code
    during the wait, but after this function has returned, we know that we
    received all possible replies.
    
    Note: To account for the interval between initial send of the request,
    and calling of this function, we modify the expiration time of the
    request.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    bfbbc223
client.py 19.5 KB