mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 23:17:23 +08:00
refactoring
This commit is contained in:
@@ -51,7 +51,6 @@ func (fc *FilerConf) loadFromChunks(filer *Filer, chunks []*filer_pb.FileChunk)
|
||||
return fc.loadFromBytes(data)
|
||||
}
|
||||
|
||||
|
||||
func (fc *FilerConf) loadFromBytes(data []byte) (err error) {
|
||||
conf := &filer_pb.FilerConf{}
|
||||
err = proto.UnmarshalText(string(data), conf)
|
||||
|
16
weed/filer/storage_option.go
Normal file
16
weed/filer/storage_option.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package filer
|
||||
|
||||
import "github.com/chrislusf/seaweedfs/weed/storage/needle"
|
||||
|
||||
type StorageOption struct {
|
||||
Replication string
|
||||
Collection string
|
||||
DataCenter string
|
||||
Rack string
|
||||
TtlSeconds int32
|
||||
Fsync bool
|
||||
}
|
||||
|
||||
func (so *StorageOption) TtlString() string {
|
||||
return needle.SecondsToTTL(so.TtlSeconds)
|
||||
}
|
Reference in New Issue
Block a user