2015-06-09 14:21:21 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "store-api.hh"
|
|
|
|
#include "derivations.hh"
|
|
|
|
|
2015-06-22 11:23:00 +02:00
|
|
|
#include "counter.hh"
|
2015-06-23 01:49:14 +02:00
|
|
|
#include "token-server.hh"
|
2015-06-22 11:23:00 +02:00
|
|
|
|
2015-06-09 14:21:21 +02:00
|
|
|
struct RemoteResult
|
|
|
|
{
|
|
|
|
enum {
|
|
|
|
rrSuccess = 0,
|
|
|
|
rrPermanentFailure = 1,
|
|
|
|
rrTimedOut = 2,
|
|
|
|
rrMiscFailure = 3
|
|
|
|
} status = rrMiscFailure;
|
|
|
|
std::string errorMsg;
|
|
|
|
time_t startTime = 0, stopTime = 0;
|
2015-06-19 14:51:59 +02:00
|
|
|
nix::Path logFile;
|
2015-06-09 14:21:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void buildRemote(std::shared_ptr<nix::StoreAPI> store,
|
|
|
|
const std::string & sshName, const std::string & sshKey,
|
|
|
|
const nix::Path & drvPath, const nix::Derivation & drv,
|
2015-06-17 13:32:06 +02:00
|
|
|
const nix::Path & logDir, unsigned int maxSilentTime, unsigned int buildTimeout,
|
2015-06-24 13:19:16 +02:00
|
|
|
TokenServer & copyClosureTokenServer, RemoteResult & result,
|
2015-06-25 16:46:59 +02:00
|
|
|
counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom,
|
|
|
|
counter & bytesSent, counter & bytesReceived);
|