Documentation ¶
Index ¶
- Constants
- func Initialize(config helper.Config) map[string]backend.Cluster
- type AioCompletion
- type CephCluster
- func (cluster *CephCluster) Append(poolname string, existName string, data io.Reader, offset int64) (oid string, size uint64, err error)
- func (cluster *CephCluster) GetReader(poolName string, oid string, startOffset int64, length uint64) (reader io.ReadCloser, err error)
- func (cluster *CephCluster) GetUsage() (usage backend.Usage, err error)
- func (cluster *CephCluster) ID() string
- func (cluster *CephCluster) Put(poolname string, data io.Reader) (oid string, size uint64, err error)
- func (cluster *CephCluster) Remove(poolname string, oid string) error
- func (cluster *CephCluster) Shutdown()
- type Pool
- type RadosConn
- type RadosDownloader
- type RadosSmallDownloader
- type StriperPool
Constants ¶
View Source
const ( MON_TIMEOUT = "10" OSD_TIMEOUT = "10" STRIPE_UNIT = 512 << 10 /* 512K */ STRIPE_COUNT = 2 OBJECT_SIZE = 8 << 20 /* 8M */ AIO_CONCURRENT = 4 DEFAULT_CEPHCONFIG_PATTERN = "conf/*.conf" MIN_CHUNK_SIZE = 512 << 10 // 512K BUFFER_SIZE = 1 << 20 // 1M MAX_CHUNK_SIZE = 8 * BUFFER_SIZE // 8M )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AioCompletion ¶
type CephCluster ¶
type CephCluster struct { Name string Conn RadosConn InstanceId uint64 // contains filtered or unexported fields }
func NewCephStorage ¶
func NewCephStorage(configFile string) *CephCluster
func (*CephCluster) GetReader ¶
func (cluster *CephCluster) GetReader(poolName string, oid string, startOffset int64, length uint64) (reader io.ReadCloser, err error)
func (*CephCluster) GetUsage ¶
func (cluster *CephCluster) GetUsage() (usage backend.Usage, err error)
func (*CephCluster) ID ¶
func (cluster *CephCluster) ID() string
func (*CephCluster) Shutdown ¶
func (cluster *CephCluster) Shutdown()
type RadosDownloader ¶
type RadosDownloader struct {
// contains filtered or unexported fields
}
func (*RadosDownloader) Close ¶
func (rd *RadosDownloader) Close() error
type RadosSmallDownloader ¶
type RadosSmallDownloader struct {
// contains filtered or unexported fields
}
func (*RadosSmallDownloader) Close ¶
func (rd *RadosSmallDownloader) Close() error
type StriperPool ¶
type StriperPool interface { Read(oid string, data []byte, offset uint64) (int, error) Write(oid string, data []byte, offset uint64) (int, error) WriteAIO(oid string, data []byte, offset uint64) (AioCompletion, error) Delete(oid string) error Destroy() SetLayoutStripeUnit(uint uint) int SetLayoutStripeCount(count uint) int SetLayoutObjectSize(size uint) int }
Click to show internal directories.
Click to hide internal directories.