erasure_code

package
v0.0.0-...-e603270 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErasureCodec

type ErasureCodec interface {
	Encode(input []byte, dataShards int, parityShards int, chunkSize int) ([][]byte, error)
	Decode(input [][]byte, dataShards uint32, parityShards uint32, chunkSize int) ([]byte, error)
	Reconstruct(input []io.Reader, dataShards int, parityShards int, output []io.Writer, chunkSize int) error
}

type ReedSolomon

type ReedSolomon struct{}

func (ReedSolomon) Decode

func (ReedSolomon) Decode(input [][]byte, dataShards int, parityShards int) ([]byte, error)

func (ReedSolomon) Encode

func (ReedSolomon) Encode(input []byte, dataShards int, parityShards int) ([][]byte, error)

func (ReedSolomon) RebuildECExtent

func (ReedSolomon) RebuildECExtent(dataShards, parityShards int, sourceExtent []*extent.Extent, start uint32, replacingIndex int, targetExtent *extent.Extent) error

FIXME: add a channel to make ReadBlocks and Reconstruct asynchronized

func (ReedSolomon) Reconstruct

func (ReedSolomon) Reconstruct(input []io.Reader, dataShards int, parityShards int, output []io.Writer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL