Name

Bif::Sync::Client - client for communication with a bif hub

Version

0.1.5_8 (yyyy-mm-dd)

Synopsis

use strict;
use warnings;
use AnyEvent;
use App::bif;
use Bif::Sync::Client;

my $ctx = App::bif->new( {} );
my $client = Bif::Sync::Client->new(
    db       => $ctx->dbw,
    location => $LOCATION,
);

# Bif::Sync::Client is a Coro::Handle user so you want
# to do things inside a coroutine
my $fh = select;
async {
    select $fh;

    $client->pull_hub;
};

AnyEvent->condvar->recv;

Description

Bif::Sync::Client is a class for communicating with a bif hub.

Constructor

Bif::Sync::Client->new( db => $dbwh, hub => $location )

Attributes

db
debug
child
child_watcher
debug_bifax
hub_id
location
changes_sent
changes_recv
on_update
rh
wh
json
on_error

Methods

pull_hub($name)
Import the changes associated with the hub $name into the local repository.
sync_hub($hub_id)
Compares the hub_changes table in the local repository against the same table on the hub and exchanges changes until they are the same. This method only results in project-only changes.
import_project
sync_project
export_project
disconnect

See Also

Bif::Sync::Server

Author

Mark Lawrence <nomad@null.net>

Copyright And License

Copyright 2014-2017 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.