From ab31f9986c68f575d902582ed3e176b777cb49e1 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 12 Sep 2016 08:03:29 -0400 Subject: Inline ssh-store.hh into ssh-store.cc --- src/libstore/ssh-store.cc | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'src/libstore/ssh-store.cc') diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc index e1eb76659167..05992bb49d6e 100644 --- a/src/libstore/ssh-store.cc +++ b/src/libstore/ssh-store.cc @@ -1,4 +1,5 @@ -#include "ssh-store.hh" +#include "store-api.hh" +#include "remote-store.hh" #include "remote-fs-accessor.hh" #include "archive.hh" #include "worker-protocol.hh" @@ -6,6 +7,38 @@ namespace nix { +class SSHStore : public RemoteStore +{ +public: + + SSHStore(string uri, const Params & params, size_t maxConnections = std::numeric_limits::max()); + + std::string getUri() override; + + void narFromPath(const Path & path, Sink & sink) override; + + ref getFSAccessor() override; + +private: + + struct Connection : RemoteStore::Connection + { + Pid sshPid; + AutoCloseFD out; + AutoCloseFD in; + }; + + ref openConnection() override; + + AutoDelete tmpDir; + + Path socketPath; + + Pid sshMaster; + + string uri; +}; + SSHStore::SSHStore(string uri, const Params & params, size_t maxConnections) : Store(params) , RemoteStore(params, maxConnections) -- cgit 1.4.1