mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 13:48:51 +08:00
go code can read and write chunk manifest
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
package needle
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const (
|
||||
//stored unit types
|
||||
// stored unit types
|
||||
Empty byte = iota
|
||||
Minute
|
||||
Hour
|
||||
@@ -139,3 +140,10 @@ func (t TTL) Minutes() uint32 {
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func SecondsToTTL(seconds int32) string {
|
||||
if seconds == 0 {
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("%dm", seconds/60)
|
||||
}
|
||||
|
Reference in New Issue
Block a user