Exemplo n.º 1
0
func New() (sysstorage ares.SystemStorage, err error) {
	ss := new(storage)
	ss.helper = leveldbhelper.Helper()
	ss.database, err = ss.helper.LevelDb(levelDbTypeName, 0)
	if err != nil {
		return
	}
	sysstorage = ss
	return
}
Exemplo n.º 2
0
func newBase() (instance *base, err error) {
	instance = new(base)
	instance.LevelDbHelper = leveldbhelper.Helper()
	instance.createBucketIdMutex = new(sync.Mutex)
	instance.createDatabase, err = instance.LevelDbHelper.LevelDb(leveldbTypeName_create, 0)
	if err != nil {
		return
	}
	instance.settingsDatabase, err = instance.LevelDbHelper.LevelDb(leveldbTypeName_settings, 0)
	if err != nil {
		return
	}
	return instance, nil
}
Exemplo n.º 3
0
func New() minos.BucketType {
	str := new(directoryBucket)
	str.database = leveldbhelper.Helper()
	return str
}
Exemplo n.º 4
0
func New() minos.BucketType {
	str := new(notifier)
	str.database = leveldbhelper.Helper()
	return str
}
Exemplo n.º 5
0
func New() minos.BucketType {
	str := new(metadataStruct)
	str.database = leveldbhelper.Helper()
	return str
}