Documentation
¶
Index ¶
Constants ¶
View Source
const ( DATA_SHARDS = 4 PARITY_SHARDS = 2 ALL_SHARDS = DATA_SHARDS + PARITY_SHARDS BLOCK_PER_SHARD = 8 * 1 << 10 BLOCK_SIZE = BLOCK_PER_SHARD * DATA_SHARDS )
Variables ¶
This section is empty.
Functions ¶
func NewEncoder ¶
Types ¶
type RSGetStream ¶
type RSGetStream struct {
// contains filtered or unexported fields
}
func NewRSGetStream ¶
func (*RSGetStream) Close ¶
func (s *RSGetStream) Close()
type RSPutStream ¶
type RSPutStream struct {
// contains filtered or unexported fields
}
func NewRSPutStream ¶
func NewRSPutStream(dataServers []string, hash string, size int64) (*RSPutStream, error)
func (*RSPutStream) Commit ¶
func (s *RSPutStream) Commit(success bool)
type RSResumableGetStream ¶ added in v0.3.0
type RSResumableGetStream struct {
// contains filtered or unexported fields
}
func NewRSResumableGetStream ¶ added in v0.3.0
func NewRSResumableGetStream(dataServers []string, uuids []string, size int64) (*RSResumableGetStream, error)
type RSResumablePutStream ¶ added in v0.3.0
type RSResumablePutStream struct { *RSPutStream // contains filtered or unexported fields }
func NewRSResumablePutStream ¶ added in v0.3.0
func NewRSResumablePutStream(dataServers []string, name, hash string, size int64) (*RSResumablePutStream, error)
func NewRSResumablePutStreamFromToken ¶ added in v0.3.0
func NewRSResumablePutStreamFromToken(token string) (*RSResumablePutStream, error)
func (*RSResumablePutStream) CurrentSize ¶ added in v0.3.0
func (s *RSResumablePutStream) CurrentSize() int64
返回第一个临时分片的大小*4, 若超出文件大小,则返回文件大小
func (*RSResumablePutStream) ToToken ¶ added in v0.3.0
func (s *RSResumablePutStream) ToToken() string
Click to show internal directories.
Click to hide internal directories.