Chris Lu
4 years ago
61 changed files with 2360 additions and 1945 deletions
-
13other/java/client/src/main/proto/filer.proto
-
3weed/command/benchmark.go
-
4weed/command/filer_copy.go
-
18weed/command/filer_sync.go
-
2weed/command/mount.go
-
8weed/command/mount_std.go
-
1weed/command/server.go
-
6weed/command/upload.go
-
23weed/command/volume.go
-
1weed/filer/entry.go
-
2weed/filer/entry_codec.go
-
2weed/filer/filer_conf.go
-
3weed/filesys/wfs.go
-
1weed/filesys/wfs_write.go
-
5weed/operation/assign_file_id.go
-
7weed/operation/submit.go
-
13weed/pb/filer.proto
-
1086weed/pb/filer_pb/filer.pb.go
-
19weed/pb/master.proto
-
1150weed/pb/master_pb/master.pb.go
-
3weed/pb/volume_server.proto
-
1430weed/pb/volume_server_pb/volume_server.pb.go
-
1weed/replication/sink/filersink/fetch_write.go
-
5weed/replication/sink/filersink/filer_sink.go
-
1weed/server/common.go
-
6weed/server/filer_grpc_server.go
-
8weed/server/filer_server_handlers_write.go
-
1weed/server/filer_server_handlers_write_autochunk.go
-
1weed/server/filer_server_handlers_write_cipher.go
-
8weed/server/master_grpc_server.go
-
12weed/server/master_grpc_server_volume.go
-
2weed/server/master_server_handlers.go
-
12weed/server/master_server_handlers_admin.go
-
2weed/server/volume_grpc_admin.go
-
11weed/server/volume_grpc_copy.go
-
2weed/server/volume_grpc_erasure_coding.go
-
4weed/server/volume_server.go
-
8weed/server/volume_server_handlers_admin.go
-
4weed/server/volume_server_handlers_ui.go
-
2weed/server/volume_server_ui/templates.go
-
2weed/server/webdav_server.go
-
2weed/shell/command_fs_configure.go
-
89weed/shell/command_volume_balance.go
-
2weed/shell/command_volume_server_evacuate.go
-
11weed/storage/disk_location.go
-
48weed/storage/store.go
-
5weed/storage/volume.go
-
4weed/storage/volume_info.go
-
23weed/storage/volume_type.go
-
1weed/topology/allocate_volume.go
-
19weed/topology/collection.go
-
3weed/topology/data_center.go
-
24weed/topology/data_node.go
-
66weed/topology/node.go
-
6weed/topology/rack.go
-
32weed/topology/topology.go
-
8weed/topology/topology_event_handling.go
-
6weed/topology/topology_map.go
-
29weed/topology/topology_test.go
-
31weed/topology/volume_growth.go
-
4weed/topology/volume_layout.go
1086
weed/pb/filer_pb/filer.pb.go
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1150
weed/pb/master_pb/master.pb.go
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1430
weed/pb/volume_server_pb/volume_server.pb.go
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,23 @@ |
|||
package storage |
|||
|
|||
import "fmt" |
|||
|
|||
type DiskType string |
|||
|
|||
const ( |
|||
HardDriveType DiskType = "" |
|||
SsdType = "ssd" |
|||
) |
|||
|
|||
func ToDiskType(vt string) (diskType DiskType, err error) { |
|||
diskType = HardDriveType |
|||
switch vt { |
|||
case "", "hdd": |
|||
diskType = HardDriveType |
|||
case "ssd": |
|||
diskType = SsdType |
|||
default: |
|||
err = fmt.Errorf("parse DiskType %s: expecting hdd or ssd\n", vt) |
|||
} |
|||
return |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue