Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::RemoteStore::Connection Struct Referenceabstract

#include <remote-store-connection.hh>

Inheritance diagram for nix::RemoteStore::Connection:
nix::SSHStore::Connection

Public Member Functions

 operator WorkerProto::ReadConn ()
 operator WorkerProto::WriteConn ()
virtual void closeWrite ()=0
std::exception_ptr processStderr (Sink *sink=0, Source *source=0, bool flush=true)

Public Attributes

FdSink to
FdSource from
WorkerProto::Version daemonVersion
std::optional< TrustedFlag > remoteTrustsUs
std::optional< std::string > daemonNixVersion
std::chrono::time_point< std::chrono::steady_clock > startTime

Detailed Description

Bidirectional connection (send and receive) used by the Remote Store implementation.

Contains Source and Sink for actual communication, along with other information learned when negotiating the connection.

Member Function Documentation

◆ operator WorkerProto::ReadConn()

nix::RemoteStore::Connection::operator WorkerProto::ReadConn ( )
inline

Coercion to WorkerProto::ReadConn. This makes it easy to use the factored out worker protocol searlizers with a RemoteStore::Connection.

The worker protocol connection types are unidirectional, unlike this type.

◆ operator WorkerProto::WriteConn()

nix::RemoteStore::Connection::operator WorkerProto::WriteConn ( )
inline

Coercion to WorkerProto::WriteConn. This makes it easy to use the factored out worker protocol searlizers with a RemoteStore::Connection.

The worker protocol connection types are unidirectional, unlike this type.

Member Data Documentation

◆ daemonNixVersion

std::optional<std::string> nix::RemoteStore::Connection::daemonNixVersion

The version of the Nix daemon that is processing our requests.

Do note, it may or may not communicating with another daemon, rather than being an "end" LocalStore or similar.

◆ daemonVersion

WorkerProto::Version nix::RemoteStore::Connection::daemonVersion

The worker protocol version of the connected daemon. This may be newer than this Lix supports.

◆ from

FdSource nix::RemoteStore::Connection::from

Receive with this.

◆ remoteTrustsUs

std::optional<TrustedFlag> nix::RemoteStore::Connection::remoteTrustsUs

Whether the remote side trusts us or not.

3 values: "yes", "no", or std::nullopt for "unknown".

Note that the "remote side" might not be just the end daemon, but also an intermediary forwarder that can make its own trusting decisions. This would be the intersection of all their trust decisions, since it takes only one link in the chain to start denying operations.

◆ startTime

std::chrono::time_point<std::chrono::steady_clock> nix::RemoteStore::Connection::startTime

Time this connection was established.

◆ to

FdSink nix::RemoteStore::Connection::to

Send with this.


The documentation for this struct was generated from the following files: