mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
24 lines
461 B
Go
24 lines
461 B
Go
|
package leveldb
|
||
|
|
||
|
import (
|
||
|
"github.com/chrislusf/seaweedfs/weed/filer"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
var _ filer.BucketAware = (*LevelDB3Store)(nil)
|
||
|
|
||
|
func (store *LevelDB3Store) OnBucketCreation(bucket string) {
|
||
|
store.createDB(bucket)
|
||
|
}
|
||
|
|
||
|
func (store *LevelDB3Store) OnBucketDeletion(bucket string) {
|
||
|
store.closeDB(bucket)
|
||
|
if bucket != "" { // just to make sure
|
||
|
os.RemoveAll(store.dir + "/" + bucket)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (store *LevelDB3Store) CanDropWholeBucket() bool {
|
||
|
return true
|
||
|
}
|