- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for bitrotAlgorithms (0.15 sec)
-
cmd/bitrot.go
} } // Available reports whether the given algorithm is available. func (a BitrotAlgorithm) Available() bool { _, ok := bitrotAlgorithms[a] return ok } // String returns the string identifier for a given bitrot algorithm. // If the algorithm is not supported String panics. func (a BitrotAlgorithm) String() string { name, ok := bitrotAlgorithms[a] if !ok {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0) -
cmd/bitrot_test.go
} if _, err = reader.ReadAt(b[:5], 30); err != nil { t.Fatal(err) } if br, ok := reader.(io.Closer); ok { br.Close() } } func TestAllBitrotAlgorithms(t *testing.T) { for bitrotAlgo := range bitrotAlgorithms { testBitrotReaderWriterAlgo(t, bitrotAlgo) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 2.1K bytes - Viewed (0) -
cmd/bitrot-whole.go
} return len(p), nil } func (b *wholeBitrotWriter) Close() error { return nil } // Returns whole-file bitrot writer. func newWholeBitrotWriter(disk StorageAPI, volume, filePath string, algo BitrotAlgorithm, shardSize int64) io.WriteCloser { return &wholeBitrotWriter{disk, volume, filePath, shardSize, algo.New()} } // Implementation to verify bitrot for the whole file. type wholeBitrotReader struct {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jan 31 02:11:45 UTC 2024 - 2.7K bytes - Viewed (0) -
cmd/xl-storage-format-v1.go
if ecindex != nei.Distribution[i] { return false } } return true } // BitrotAlgorithm specifies a algorithm used for bitrot protection. type BitrotAlgorithm uint const ( // SHA256 represents the SHA-256 hash function SHA256 BitrotAlgorithm = 1 + iota // HighwayHash256 represents the HighwayHash-256 hash function HighwayHash256
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 8.4K bytes - Viewed (0) -
cmd/bitrot-streaming.go
func newStreamingBitrotWriterBuffer(w io.Writer, algo BitrotAlgorithm, shardSize int64) io.Writer { return &streamingBitrotWriter{iow: ioutil.NopCloser(w), h: algo.New(), shardSize: shardSize, canClose: nil, closeWithErr: func(err error) {}} } // Returns streaming bitrot writer implementation. func newStreamingBitrotWriter(disk StorageAPI, origvolume, volume, filePath string, length int64, algo BitrotAlgorithm, shardSize int64) io.Writer { h := algo.New()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
cmd/xl-storage-format-v1_gen.go
) // DecodeMsg implements msgp.Decodable func (z *BitrotAlgorithm) DecodeMsg(dc *msgp.Reader) (err error) { { var zb0001 uint zb0001, err = dc.ReadUint() if err != nil { err = msgp.WrapError(err) return } (*z) = BitrotAlgorithm(zb0001) } return } // EncodeMsg implements msgp.Encodable func (z BitrotAlgorithm) EncodeMsg(en *msgp.Writer) (err error) { err = en.WriteUint(uint(z))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 41.2K bytes - Viewed (0) -
cmd/erasure-heal_test.go
// erasure reconstruction in this test offDisks int // bad disks are online disks which return errors badDisks, badStaleDisks int blocksize, size int64 algorithm BitrotAlgorithm shouldFail bool }{ {dataBlocks: 2, disks: 4, offDisks: 1, badDisks: 0, badStaleDisks: 0, blocksize: int64(blockSizeV2), size: oneMiByte, algorithm: SHA256, shouldFail: false}, // 0
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.9K bytes - Viewed (0) -
cmd/erasure-encode_test.go
var erasureEncodeTests = []struct { dataBlocks int onDisks, offDisks int blocksize, data int64 offset int algorithm BitrotAlgorithm shouldFail, shouldFailQuorum bool }{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
xlMeta.Meta = make(map[string]string) xlMeta.Meta["testKey1"] = "val1" xlMeta.Meta["testKey2"] = "val2" return xlMeta } func (m *xlMetaV1Object) AddTestObjectCheckSum(partNumber int, algorithm BitrotAlgorithm, hash string) { checksum, err := hex.DecodeString(hash) if err != nil { panic(err) } m.Erasure.Checksums[partNumber-1] = ChecksumInfo{partNumber, algorithm, checksum} }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 17.6K bytes - Viewed (0) -
cmd/erasure-decode_test.go
dataBlocks int onDisks, offDisks int blocksize, data int64 offset int64 length int64 algorithm BitrotAlgorithm shouldFail, shouldFailQuorum bool }{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0)