29 lines
415 B
Go
29 lines
415 B
Go
package engine
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"robotfs/store"
|
|
)
|
|
|
|
type MetaDataManager struct {
|
|
store store.MetaStore
|
|
}
|
|
|
|
func NewMetaDataManager(store store.MetaStore) (*MetaDataManager, error) {
|
|
if store == nil {
|
|
return nil, fmt.Errorf("meta store is required")
|
|
}
|
|
return &MetaDataManager{
|
|
store: store,
|
|
}, nil
|
|
}
|
|
|
|
func (m *MetaDataManager) Shutdown() error {
|
|
if m.store != nil {
|
|
m.store.Shutdown()
|
|
}
|
|
|
|
return nil
|
|
}
|