Documentation
¶
Index ¶
- Variables
- func AvailableBackends() (avail []string)
- func BackendIsAvailable(name string) bool
- func ReadFragment(reader io.Reader) ([]byte, error)
- type Backend
- func (backend *Backend) Close() error
- func (backend *Backend) Decode(frags [][]byte) ([]byte, error)
- func (backend *Backend) Encode(data []byte) ([][]byte, error)
- func (backend *Backend) GetFileWriter(prefix string, perm os.FileMode) (io.WriteCloser, error)
- func (backend *Backend) IsInvalidFragment(frag []byte) bool
- func (backend *Backend) Reconstruct(frags [][]byte, fragIndex int) ([]byte, error)
- type ECWriter
- type FragmentInfo
- type Params
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var KnownBackends = [...]string{
"null",
"jerasure_rs_vand",
"jerasure_rs_cauchy",
"flat_xor_hd",
"isa_l_rs_vand",
"shss",
"liberasurecode_rs_vand",
"isa_l_rs_cauchy",
"libphazr",
}
Functions ¶
func AvailableBackends ¶
func AvailableBackends() (avail []string)
func BackendIsAvailable ¶
Types ¶
type Backend ¶
type Backend struct {
Params
// contains filtered or unexported fields
}
func InitBackend ¶
func (*Backend) GetFileWriter ¶
func (*Backend) IsInvalidFragment ¶
type ECWriter ¶
type ECWriter struct {
Backend *Backend
Writers []io.WriteCloser
}
type FragmentInfo ¶
type FragmentInfo struct {
Index int
Size int
BackendMetadataSize int
OrigDataSize uint64
BackendID C.ec_backend_id_t
BackendName string
BackendVersion Version
ErasureCodeVersion Version
IsValid bool
MetadataChecksum uint32
}
func GetFragmentInfo ¶
func GetFragmentInfo(frag []byte) FragmentInfo
Click to show internal directories.
Click to hide internal directories.