Introduce the `remote.NAME.fetchEvery` configuration param

Currently, there are three methods for obtaining repository updates in
pull-replication:
* Apply objects - This transfers updated refs and objects via the REST
  API; optimisation on the top of Git fetch for small payloads and for
  subset of refs
* Trigger git fetch (as configured preference) or fallback in all cases
  when apply object is not suitable or fails
* Event tiggered through the event-broker.

The parameter (if configured and when implemented) enables the fourth,
time-based (every `n` seconds) method, that is independent of the
REST API. It will periodically invoke git fetch to detect and retrieve
new data as it becomes available. Note that it is meant for the remote
that doesn't offer any events or webhooks to provide information about
new data.

The default parameter value is `0s` which means that periodical fetch
is disabled. Note that larger time units (`m`, `h`, etc...) can be
used to configure it conveniently.

Note that enbaling periodic fetch and REST API (IOW having both `apiUrl`
and `fetchEvery` configured) may lead to racy writes to the repository
and as such is considered an invalid configuration. Such configuration
results in reported as error and prevents the plugin from starting.

Bug: Issue 322146240
Change-Id: I23fc5e23aabff2dd0f053de235245614cf4706c9
4 files changed
tree: 3bc95001a90509e012be62866e01131e85af8f9d
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. Jenkinsfile
  6. LICENSE