예제 #1
0
func (dpnSync *DPNSync) getMembers(remoteClient *network.DPNRestClient, pageNumber int) *network.DPNResponse {
	remoteNode := dpnSync.RemoteNodes[remoteClient.Node]
	params := url.Values{}
	params.Set("after", remoteNode.LastPullDate.Format(time.RFC3339Nano))
	params.Set("page", fmt.Sprintf("%d", pageNumber))
	params.Set("per_page", strconv.Itoa(SYNC_BATCH_SIZE))
	return remoteClient.FixityCheckList(params)
}
예제 #2
0
func (dpnSync *DPNSync) getFixities(remoteClient *network.DPNRestClient, pageNumber int) *network.DPNResponse {
	// Get fixities for the remote node *calculated by that node*
	remoteNode := dpnSync.RemoteNodes[remoteClient.Node]
	params := url.Values{}
	params.Set("after", remoteNode.LastPullDate.Format(time.RFC3339Nano))
	params.Set("node", remoteNode.Namespace)
	params.Set("page", fmt.Sprintf("%d", pageNumber))
	params.Set("per_page", strconv.Itoa(SYNC_BATCH_SIZE))
	return remoteClient.FixityCheckList(params)
}