You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
461 B

  1. package leveldb
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/filer"
  4. "os"
  5. )
  6. var _ filer.BucketAware = (*LevelDB3Store)(nil)
  7. func (store *LevelDB3Store) OnBucketCreation(bucket string) {
  8. store.createDB(bucket)
  9. }
  10. func (store *LevelDB3Store) OnBucketDeletion(bucket string) {
  11. store.closeDB(bucket)
  12. if bucket != "" { // just to make sure
  13. os.RemoveAll(store.dir + "/" + bucket)
  14. }
  15. }
  16. func (store *LevelDB3Store) CanDropWholeBucket() bool {
  17. return true
  18. }