Send stream events for ref replication
Send replication events when a git reference is updated, currently not sending
event for replication at plugin start up or when replication command is
executed. Send ref-replicated event for each node the ref is done replicating
to and send ref-replication-done event once replication of the ref is complete
to all the nodes.
The main goal of this change is to allow interested tools (e.g.Jenkins Gerrit
Trigger) to know when replication of a ref to a node is complete.
Here is an example of an event when a ref is replicated to a specific node:
{"type":"ref-replicated",
"project":"testReplication",
"ref":"refs/heads/master",
"targetNode":"someHost",
"status":"succeeded"}
Here is an example of an event when a ref is replicated to all the nodes:
{"type":"ref-replication-done",
"project":"testReplication",
"ref":"refs/heads/master",
"nodesCount":5}
Change-Id: Ic2163e0f28678cb484e4dba2989d08b93e3729b6
8 files changed