Inline ssh-store.hh into ssh-store.cc

This commit is contained in:
Shea Levy 2016-09-12 08:03:29 -04:00
parent 584f8a62de
commit ab31f9986c
2 changed files with 34 additions and 41 deletions

View file

@ -1,4 +1,5 @@
#include "ssh-store.hh" #include "store-api.hh"
#include "remote-store.hh"
#include "remote-fs-accessor.hh" #include "remote-fs-accessor.hh"
#include "archive.hh" #include "archive.hh"
#include "worker-protocol.hh" #include "worker-protocol.hh"
@ -6,6 +7,38 @@
namespace nix { namespace nix {
class SSHStore : public RemoteStore
{
public:
SSHStore(string uri, const Params & params, size_t maxConnections = std::numeric_limits<size_t>::max());
std::string getUri() override;
void narFromPath(const Path & path, Sink & sink) override;
ref<FSAccessor> getFSAccessor() override;
private:
struct Connection : RemoteStore::Connection
{
Pid sshPid;
AutoCloseFD out;
AutoCloseFD in;
};
ref<RemoteStore::Connection> openConnection() override;
AutoDelete tmpDir;
Path socketPath;
Pid sshMaster;
string uri;
};
SSHStore::SSHStore(string uri, const Params & params, size_t maxConnections) SSHStore::SSHStore(string uri, const Params & params, size_t maxConnections)
: Store(params) : Store(params)
, RemoteStore(params, maxConnections) , RemoteStore(params, maxConnections)

View file

@ -1,40 +0,0 @@
#pragma once
#include "store-api.hh"
#include "remote-store.hh"
namespace nix {
class SSHStore : public RemoteStore
{
public:
SSHStore(string uri, const Params & params, size_t maxConnections = std::numeric_limits<size_t>::max());
std::string getUri() override;
void narFromPath(const Path & path, Sink & sink) override;
ref<FSAccessor> getFSAccessor() override;
private:
struct Connection : RemoteStore::Connection
{
Pid sshPid;
AutoCloseFD out;
AutoCloseFD in;
};
ref<RemoteStore::Connection> openConnection() override;
AutoDelete tmpDir;
Path socketPath;
Pid sshMaster;
string uri;
};
}