mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
ce50d2e34c
Summary: Similarly to what is done for FUSE and ProjectedFS, the dispatcher is the glue that sits in between the protocol specific bits and the inodes layer. For now, this only implements "getattr" but it will be filled overtime as more RPC can be answered properly. Reviewed By: kmancini Differential Revision: D26389795 fbshipit-source-id: 19cf3457feec2ebc100e632cb28c20b11fdde26d
37 lines
953 B
C++
37 lines
953 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#include "eden/fs/inodes/EdenDispatcherFactory.h"
|
|
|
|
#ifndef _WIN32
|
|
#include "eden/fs/inodes/FuseDispatcherImpl.h"
|
|
#include "eden/fs/inodes/NfsDispatcherImpl.h"
|
|
#else
|
|
#include "eden/fs/inodes/PrjfsDispatcherImpl.h"
|
|
#endif
|
|
|
|
namespace facebook::eden {
|
|
|
|
#ifndef _WIN32
|
|
std::unique_ptr<FuseDispatcher> EdenDispatcherFactory::makeFuseDispatcher(
|
|
EdenMount* mount) {
|
|
return std::make_unique<FuseDispatcherImpl>(mount);
|
|
}
|
|
|
|
std::unique_ptr<NfsDispatcher> EdenDispatcherFactory::makeNfsDispatcher(
|
|
EdenMount* mount) {
|
|
return std::make_unique<NfsDispatcherImpl>(mount);
|
|
}
|
|
#else
|
|
std::unique_ptr<PrjfsDispatcher> EdenDispatcherFactory::makePrjfsDispatcher(
|
|
EdenMount* mount) {
|
|
return std::make_unique<PrjfsDispatcherImpl>(mount);
|
|
}
|
|
#endif
|
|
|
|
} // namespace facebook::eden
|