Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::WorkerProto Struct Reference

#include <worker-protocol.hh>

Classes

struct  Version
struct  ReadConn
struct  WriteConn
struct  ClientHandshakeInfo
struct  Serialise< DerivedPath >
struct  Serialise< SingleDerivedPath >
struct  Serialise< BuildResult >
struct  Serialise< KeyedBuildResult >
struct  Serialise< ValidPathInfo >
struct  Serialise< UnkeyedValidPathInfo >
struct  Serialise< DrvOutput >
struct  Serialise< UnkeyedRealisation >
struct  Serialise< Realisation >
struct  Serialise< std::optional< UnkeyedRealisation > >
struct  Serialise< BuildMode >
struct  Serialise< GCAction >
struct  Serialise< std::optional< TrustedFlag > >
struct  Serialise< std::optional< std::chrono::microseconds > >
struct  Serialise< WorkerProto::ClientHandshakeInfo >
struct  Serialise< GCOptions::SpecificPaths >
struct  Serialise< GCOptions::GCPaths >
struct  Serialise< std::vector< T > >
struct  Serialise< std::set< T, Compare > >
struct  Serialise< std::tuple< Ts... > >
struct  Serialise< std::map< K, V, Compare > >
struct  BasicConnection
struct  BasicClientConnection
struct  BasicServerConnection
struct  Serialise

Public Types

enum struct  Op : uint64_t {
  IsValidPath = 1 , QueryReferrers = 6 , AddToStore = 7 , AddTextToStore = 8 ,
  BuildPaths = 9 , EnsurePath = 10 , AddTempRoot = 11 , AddIndirectRoot = 12 ,
  SyncWithGC = 13 , FindRoots = 14 , QueryDeriver = 18 , SetOptions = 19 ,
  CollectGarbage = 20 , QuerySubstitutablePathInfo = 21 , QueryDerivationOutputs = 22 , QueryAllValidPaths = 23 ,
  QueryPathInfo = 26 , QueryDerivationOutputNames = 28 , QueryPathFromHashPart = 29 , QuerySubstitutablePathInfos = 30 ,
  QueryValidPaths = 31 , QuerySubstitutablePaths = 32 , QueryValidDerivers = 33 , OptimiseStore = 34 ,
  VerifyStore = 35 , BuildDerivation = 36 , AddSignatures = 37 , NarFromPath = 38 ,
  AddToStoreNar = 39 , QueryMissing = 40 , QueryDerivationOutputMap = 41 , RegisterDrvOutput = 42 ,
  QueryRealisation = 43 , AddMultipleToStore = 44 , AddBuildLog = 45 , BuildPathsWithResults = 46 ,
  AddPermRoot = 47 , AddTempRoots = 49 , SubmitOutput = 1000 , AddToStoreScanning = 1001
}

Static Public Member Functions

template<typename T>
static void write (const StoreDirConfig &store, WriteConn conn, const T &t)

Static Public Attributes

static const Version latest
static const Version minimum
static const Version builderRpcV0
static constexpr std::string_view featureRealisationWithPath = "realisation-with-path-not-hash"
static constexpr std::string_view featureDeleteDeadSpecificReferrers = "delete-dead-specific-referrers"
static constexpr std::string_view featureDisableSetOptions = "disable-set-options"
static constexpr std::string_view featureAddToStoreScanning = "add-to-store-scanning"
static constexpr std::string_view featureSubmitOutput = "submit-output"
static constexpr std::string_view featureAddTempRoots = "addTempRoots"

Detailed Description

The "worker protocol", used by unix:// and ssh-ng:// stores.

This struct is basically just a namespace; We use a type rather than a namespace just so we can use it as a template argument.

Member Function Documentation

◆ write()

template<typename T>
void nix::WorkerProto::write ( const StoreDirConfig & store,
WriteConn conn,
const T & t )
inlinestatic

Wrapper function around WorkerProto::Serialise<T>::write that allows us to infer the type instead of having to write it down explicitly.

Member Data Documentation

◆ builderRpcV0

const WorkerProto::Version nix::WorkerProto::builderRpcV0
static
Initial value:
= {
.number =
{
.major = 1,
.minor = 38,
},
.features =
{
},
}
static constexpr std::string_view featureRealisationWithPath
Definition worker-protocol.hh:132
static constexpr std::string_view featureSubmitOutput
Definition worker-protocol.hh:152
static constexpr std::string_view featureAddToStoreScanning
Definition worker-protocol.hh:147
static constexpr std::string_view featureDisableSetOptions
Definition worker-protocol.hh:142

Static version for the builder-rpc-v0 feature. Should never change, as any modification would be derivation-visible.

◆ featureAddToStoreScanning

std::string_view nix::WorkerProto::featureAddToStoreScanning = "add-to-store-scanning"
staticconstexpr

Feature for enabling the AddToStoreScanning operation

◆ featureDeleteDeadSpecificReferrers

std::string_view nix::WorkerProto::featureDeleteDeadSpecificReferrers = "delete-dead-specific-referrers"
staticconstexpr

Feature for garbage collecting a specific set of paths and deleting referrers.

◆ featureDisableSetOptions

std::string_view nix::WorkerProto::featureDisableSetOptions = "disable-set-options"
staticconstexpr

Feature for disabling SetOptions, which is a no-op in recursive-nix

◆ featureRealisationWithPath

std::string_view nix::WorkerProto::featureRealisationWithPath = "realisation-with-path-not-hash"
staticconstexpr

Feature for transmitting UnkeyedRealisation and DrvOutput using drvPath (store path) instead of the old hash-based JSON format.

◆ featureSubmitOutput

std::string_view nix::WorkerProto::featureSubmitOutput = "submit-output"
staticconstexpr

Feature for enabling the SubmitOutput operation

◆ latest

const WorkerProto::Version nix::WorkerProto::latest
static
Initial value:
= {
.number =
{
.major = 1,
.minor = 38,
},
.features =
{
std::string{WorkerProto::featureAddTempRoots},
},
}
static constexpr std::string_view featureDeleteDeadSpecificReferrers
Definition worker-protocol.hh:137
Note
you generally shouldn't change the protocol version number. Define a new WorkerProto::Version::Feature instead.

◆ minimum

const WorkerProto::Version nix::WorkerProto::minimum
static
Initial value:
= {
.number =
{
.major = 1,
.minor = 18,
},
}

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