示例#1
0
文件: routers.go 项目: nohitall/minio
// getNewCloudStorageAPI instantiate a new CloudStorageAPI.
func getNewCloudStorageAPI(conf cloudServerConfig) CloudStorageAPI {
	fs, err := fs.New(conf.Path, conf.MinFreeDisk)
	fatalIf(err.Trace(), "Initializing filesystem failed.", nil)

	return CloudStorageAPI{
		Filesystem: fs,
		AccessLog:  conf.AccessLog,
	}
}
示例#2
0
// getNewCloudStorageAPI instantiate a new CloudStorageAPI.
func getNewCloudStorageAPI(conf cloudServerConfig) CloudStorageAPI {
	fs, err := fs.New(conf.Path)
	fatalIf(err.Trace(), "Initializing filesystem failed.", nil)

	fs.SetMinFreeDisk(conf.MinFreeDisk)
	if conf.Expiry > 0 {
		go fs.AutoExpiryThread(conf.Expiry)
	}
	return CloudStorageAPI{
		Filesystem: fs,
		Anonymous:  conf.Anonymous,
		AccessLog:  conf.AccessLog,
	}
}