mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
further bootstrap/startup optimization for reading 'format.json' (#18868)
- Move RenameFile to websockets - Move ReadAll that is primarily is used for reading 'format.json' to to websockets - Optimize DiskInfo calls, and provide a way to make a NoOp DiskInfo call.
This commit is contained in:
@@ -37,6 +37,13 @@ type RenameOptions struct {
|
||||
BaseOptions
|
||||
}
|
||||
|
||||
// DiskInfoOptions options for requesting custom results.
|
||||
type DiskInfoOptions struct {
|
||||
DiskID string `msg:"id"`
|
||||
Metrics bool `msg:"m"`
|
||||
NoOp bool `msg:"np"`
|
||||
}
|
||||
|
||||
//go:generate msgp -file=$GOFILE
|
||||
|
||||
// DiskInfo is an extended type which returns current
|
||||
@@ -423,6 +430,22 @@ type RenameDataHandlerParams struct {
|
||||
Opts RenameOptions `msg:"ro"`
|
||||
}
|
||||
|
||||
// RenameFileHandlerParams are parameters for RenameFileHandler.
|
||||
type RenameFileHandlerParams struct {
|
||||
DiskID string `msg:"id"`
|
||||
SrcVolume string `msg:"sv"`
|
||||
SrcFilePath string `msg:"sp"`
|
||||
DstVolume string `msg:"dv"`
|
||||
DstFilePath string `msg:"dp"`
|
||||
}
|
||||
|
||||
// ReadAllHandlerParams are parameters for ReadAllHandler.
|
||||
type ReadAllHandlerParams struct {
|
||||
DiskID string `msg:"id"`
|
||||
Volume string `msg:"v"`
|
||||
FilePath string `msg:"fp"`
|
||||
}
|
||||
|
||||
// RenameDataResp - RenameData()'s response.
|
||||
type RenameDataResp struct {
|
||||
Signature uint64 `msg:"sig"`
|
||||
|
||||
Reference in New Issue
Block a user