2018-02-21 15:22:49 +00:00
|
|
|
#include "command.hh"
|
|
|
|
#include "shared.hh"
|
|
|
|
#include "store-api.hh"
|
|
|
|
|
|
|
|
using namespace nix;
|
|
|
|
|
|
|
|
struct CmdPingStore : StoreCommand
|
|
|
|
{
|
|
|
|
std::string description() override
|
|
|
|
{
|
2020-12-09 16:55:59 +00:00
|
|
|
return "test whether a store can be accessed";
|
2018-02-21 15:22:49 +00:00
|
|
|
}
|
|
|
|
|
2020-12-09 16:55:59 +00:00
|
|
|
std::string doc() override
|
2018-02-21 15:22:49 +00:00
|
|
|
{
|
2020-12-09 16:55:59 +00:00
|
|
|
return
|
|
|
|
#include "ping-store.md"
|
|
|
|
;
|
2018-02-21 15:22:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void run(ref<Store> store) override
|
|
|
|
{
|
|
|
|
store->connect();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-07-24 18:38:56 +00:00
|
|
|
static auto rCmdPingStore = registerCommand2<CmdPingStore>({"store", "ping"});
|