|
|
@ -16,11 +16,7 @@ type storageServer struct { |
|
|
|
|
|
|
|
|
|
|
|
// MakeVolHandler - make vol handler is rpc wrapper for MakeVol operation.
|
|
|
|
// MakeVolHandler - make vol handler is rpc wrapper for MakeVol operation.
|
|
|
|
func (s *storageServer) MakeVolHandler(arg *string, reply *GenericReply) error { |
|
|
|
func (s *storageServer) MakeVolHandler(arg *string, reply *GenericReply) error { |
|
|
|
err := s.storage.MakeVol(*arg) |
|
|
|
return s.storage.MakeVol(*arg) |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return err |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return nil |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ListVolsHandler - list vols handler is rpc wrapper for ListVols operation.
|
|
|
|
// ListVolsHandler - list vols handler is rpc wrapper for ListVols operation.
|
|
|
@ -46,11 +42,7 @@ func (s *storageServer) StatVolHandler(arg *string, reply *VolInfo) error { |
|
|
|
// DeleteVolHandler - delete vol handler is a rpc wrapper for
|
|
|
|
// DeleteVolHandler - delete vol handler is a rpc wrapper for
|
|
|
|
// DeleteVol operation.
|
|
|
|
// DeleteVol operation.
|
|
|
|
func (s *storageServer) DeleteVolHandler(arg *string, reply *GenericReply) error { |
|
|
|
func (s *storageServer) DeleteVolHandler(arg *string, reply *GenericReply) error { |
|
|
|
err := s.storage.DeleteVol(*arg) |
|
|
|
return s.storage.DeleteVol(*arg) |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return err |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return nil |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// File operations
|
|
|
|
/// File operations
|
|
|
|