Documentation ¶
Index ¶
- type Args
- type FileSystemService
- func (fs *FileSystemService) Contains(file string) bool
- func (fs *FileSystemService) Delete(sdfsfilename string) error
- func (fs *FileSystemService) Get(sdfsfilename string, localfilename string) error
- func (fs *FileSystemService) HandleDelete(args Args, reply *string) error
- func (fs *FileSystemService) HandleFileMetaData(args *Args, reply *int) error
- func (fs *FileSystemService) HandleGet(args *Args, reply *string) error
- func (fs *FileSystemService) HandleInsert(args Args, reply *string) error
- func (fs *FileSystemService) HandleInsertBroadcast(args Args, reply *int) error
- func (fs *FileSystemService) HandleRequestToken(args Args, reply *int) error
- func (fs *FileSystemService) HandleUpdate(args *Args, reply *int) error
- func (fs *FileSystemService) ListAllFiles() []string
- func (fs *FileSystemService) ListFiles() ([]string, error)
- func (fs *FileSystemService) ListMachines(sdfsfilename string) ([]string, error)
- func (fs *FileSystemService) PrePut(sdfsfilename string) error
- func (fs *FileSystemService) Put(localfilename string, sdfsfilename string) error
- func (fs *FileSystemService) StartService(ms *M.MembershipService) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { Filename string Content string // can be empty Timestamp string // can be empty }
Args is a joint representation of arguments for RPCs
type FileSystemService ¶
type FileSystemService struct { Ms *M.MembershipService IsMaster bool // am I the master of MapleJuice? LeaveReportChan chan string // leave report channel FailReportChan chan string // failure report channel JoinReportChan chan string // join report channel // contains filtered or unexported fields }
FileSystemService provides distributed file management services
func (*FileSystemService) Contains ¶
func (fs *FileSystemService) Contains(file string) bool
Contains checks if a file is contained in SDFS
func (*FileSystemService) Delete ¶
func (fs *FileSystemService) Delete(sdfsfilename string) error
Delete erases the SDFS file
func (*FileSystemService) Get ¶
func (fs *FileSystemService) Get(sdfsfilename string, localfilename string) error
Get retrieves the SDFS file and stores it in the local file
func (*FileSystemService) HandleDelete ¶
func (fs *FileSystemService) HandleDelete(args Args, reply *string) error
HandleDelete handles a remote delete file request
func (*FileSystemService) HandleFileMetaData ¶
func (fs *FileSystemService) HandleFileMetaData(args *Args, reply *int) error
HandleFileMetaData sends meta data of SDFS to newly joined nodes
func (*FileSystemService) HandleGet ¶
func (fs *FileSystemService) HandleGet(args *Args, reply *string) error
HandleGet handles a remote get file request
func (*FileSystemService) HandleInsert ¶
func (fs *FileSystemService) HandleInsert(args Args, reply *string) error
HandleInsert handles a remote insert file request
func (*FileSystemService) HandleInsertBroadcast ¶
func (fs *FileSystemService) HandleInsertBroadcast(args Args, reply *int) error
HandleInsertBroadcast handles a remote broadcast of file inserted info request
func (*FileSystemService) HandleRequestToken ¶
func (fs *FileSystemService) HandleRequestToken(args Args, reply *int) error
HandleRequestToken handles token request for mutual exclusive file writes
func (*FileSystemService) HandleUpdate ¶
func (fs *FileSystemService) HandleUpdate(args *Args, reply *int) error
HandleUpdate handles a remote update file request
func (*FileSystemService) ListAllFiles ¶
func (fs *FileSystemService) ListAllFiles() []string
ListAllFiles lists all files stored in SDFS
func (*FileSystemService) ListFiles ¶
func (fs *FileSystemService) ListFiles() ([]string, error)
ListFiles lilsts all files currently being stored at this machine
func (*FileSystemService) ListMachines ¶
func (fs *FileSystemService) ListMachines(sdfsfilename string) ([]string, error)
ListMachines lists all machine addresses where this file is currently being stored
func (*FileSystemService) PrePut ¶
func (fs *FileSystemService) PrePut(sdfsfilename string) error
PrePut achieves mutual exclusion before the real put
func (*FileSystemService) Put ¶
func (fs *FileSystemService) Put(localfilename string, sdfsfilename string) error
Put inserts or updates the SDFS file with the local file
func (*FileSystemService) StartService ¶
func (fs *FileSystemService) StartService(ms *M.MembershipService) error
StartService starts file system service