Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
uds-remote-store.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/store/remote-store.hh
"
5
#include "
nix/store/remote-store-connection.hh
"
6
#include "
nix/store/indirect-root-store.hh
"
7
8
namespace
nix {
9
24
std::filesystem::path
getDaemonSocketPath
(
const
Store::Config & config);
25
26
struct
UDSRemoteStoreConfig : std::enable_shared_from_this<UDSRemoteStoreConfig>,
27
virtual
LocalFSStoreConfig,
28
virtual
RemoteStoreConfig
29
{
30
private
:
31
void
anchor()
override
;
32
33
public
:
34
UDSRemoteStoreConfig(
const
std::filesystem::path &
path
,
const
Params & params);
35
36
UDSRemoteStoreConfig(
const
Params & params);
37
38
static
const
std::string name()
39
{
40
return
"Local Daemon Store"
;
41
}
42
43
static
std::string doc();
44
50
std::filesystem::path
path
;
51
52
static
StringSet
uriSchemes()
53
{
54
return
{
"unix"
};
55
}
56
57
ref<Store>
openStore
()
const override
;
58
59
StoreReference
getReference
()
const override
;
60
};
61
62
struct
UDSRemoteStore :
virtual
IndirectRootStore
,
virtual
RemoteStore
63
{
64
private
:
65
void
anchor()
override
;
66
67
public
:
68
using
Config =
UDSRemoteStoreConfig
;
69
70
ref<const Config>
config;
71
72
UDSRemoteStore(
ref<const Config>
);
73
74
ref<SourceAccessor>
getFSAccessor
(
bool
requireValidPath =
true
)
override
75
{
76
return
LocalFSStore::getFSAccessor
(requireValidPath);
77
}
78
79
std::shared_ptr<SourceAccessor>
getFSAccessor
(
const
StorePath
& path,
bool
requireValidPath =
true
)
override
80
{
81
return
LocalFSStore::getFSAccessor
(path, requireValidPath);
82
}
83
84
void
narFromPath
(
const
StorePath
& path,
Sink
& sink)
override
85
{
86
Store::narFromPath
(path, sink);
87
}
88
97
void
addIndirectRoot
(
const
std::filesystem::path & path)
override
;
98
99
private
:
100
101
struct
Connection :
RemoteStore::Connection
102
{
103
AutoCloseFD
fd;
104
void
closeWrite()
override
;
105
};
106
107
ref<RemoteStore::Connection> openConnection()
override
;
108
};
109
110
}
// namespace nix
nix::AutoCloseFD
Definition
file-descriptor.hh:265
nix::StorePath
Definition
path.hh:33
nix::Store::narFromPath
virtual void narFromPath(const StorePath &path, Sink &sink)
Definition
store-api.cc:390
nix::ref
Definition
ref.hh:58
indirect-root-store.hh
remote-store-connection.hh
remote-store.hh
nix::openStore
ref< Store > openStore(StoreReference &&storeURI)
Definition
store-registration.cc:24
nix::IndirectRootStore
Definition
indirect-root-store.hh:40
nix::LocalFSStore::getFSAccessor
ref< SourceAccessor > getFSAccessor(bool requireValidPath=true) override
Definition
local-fs-store.cc:178
nix::RemoteStore::Connection
Definition
remote-store-connection.hh:22
nix::Sink
Definition
serialise.hh:18
nix::UDSRemoteStoreConfig
Definition
uds-remote-store.hh:29
nix::UDSRemoteStoreConfig::getReference
StoreReference getReference() const override
Definition
uds-remote-store.cc:66
nix::UDSRemoteStoreConfig::path
std::filesystem::path path
Definition
uds-remote-store.hh:50
nix::UDSRemoteStore::narFromPath
void narFromPath(const StorePath &path, Sink &sink) override
Definition
uds-remote-store.hh:84
nix::UDSRemoteStore::getFSAccessor
std::shared_ptr< SourceAccessor > getFSAccessor(const StorePath &path, bool requireValidPath=true) override
Definition
uds-remote-store.hh:79
nix::UDSRemoteStore::addIndirectRoot
void addIndirectRoot(const std::filesystem::path &path) override
Definition
uds-remote-store.cc:106
nix::UDSRemoteStore::getFSAccessor
ref< SourceAccessor > getFSAccessor(bool requireValidPath=true) override
Definition
uds-remote-store.hh:74
nix::StringSet
std::set< std::string, std::less<> > StringSet
Definition
types.hh:45
nix::getDaemonSocketPath
std::filesystem::path getDaemonSocketPath(const Store::Config &config)
Definition
uds-remote-store.cc:22
libstore
include
nix
store
uds-remote-store.hh
Generated by
1.18.0