sapling/eden/fs/inodes/EdenDispatcherFactory.h
Xavier Deguillard ce50d2e34c fs: add an NfsDispatcher
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
2021-02-17 23:32:38 -08:00

32 lines
729 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.
*/
#pragma once
#ifndef _WIN32
#include "eden/fs/fuse/FuseDispatcher.h"
#include "eden/fs/nfs/NfsDispatcher.h"
#else
#include "eden/fs/prjfs/PrjfsDispatcher.h"
#endif
namespace facebook::eden {
class EdenMount;
class EdenDispatcherFactory {
public:
#ifndef _WIN32
static std::unique_ptr<FuseDispatcher> makeFuseDispatcher(EdenMount* mount);
static std::unique_ptr<NfsDispatcher> makeNfsDispatcher(EdenMount* mount);
#else
static std::unique_ptr<PrjfsDispatcher> makePrjfsDispatcher(EdenMount* mount);
#endif
};
} // namespace facebook::eden