sapling/eden/fs/service/eden.thrift
Michael Bolin 5f7a0c287f Add a Thrift API to get the SHA-1 of a file.
Summary:
Other tools, such as Buck, will benefit from being able to get
the SHA-1 of a file without having to read the entire contents
of the file (or do the associated computation that is proportional
to the size of the contents of the file).

Reviewed By: simpkins

Differential Revision: D3345828

fbshipit-source-id: 360bb268793369af75f408208e8211d8b9db146d
2016-05-27 18:17:07 -07:00

38 lines
984 B
Thrift

include "common/fb303/if/fb303.thrift"
namespace cpp2 facebook.eden
namespace java com.facebook.eden
namespace py facebook.eden
exception EdenError {
1: required string message
2: optional i32 errorCode
} (message = 'message')
struct MountInfo {
1: string mountPoint
2: string edenClientPath
}
service EdenService extends fb303.FacebookService {
list<MountInfo> listMounts() throws (1: EdenError ex)
void mount(1: MountInfo info) throws (1: EdenError ex)
void unmount(1: string mountPoint) throws (1: EdenError ex)
void checkOutRevision(1: string mountPoint, 2: string hash)
throws (1: EdenError ex)
// Mount-specific APIs.
/**
* Throws an EdenError if any of the following occur:
* - path is the empty string.
* - path identifies a non-existent file.
* - path identifies something that is not an ordinary file (e.g., symlink
* or directory).
*/
binary getSHA1(1: string mountPoint, 2: string path)
throws (1: EdenError ex)
}