github.com/ethersphere/bee/v2@v2.2.0/pkg/file/redundancy/export_test.go (about) 1 // Copyright 2023 The Swarm Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package redundancy 6 7 // SetErasureEncoder changes erasureEncoderFunc to a new erasureEncoder facade 8 func SetErasureEncoder(f func(shards, parities int) (ErasureEncoder, error)) { 9 erasureEncoderFunc = f 10 } 11 12 // GetErasureEncoder returns erasureEncoderFunc 13 func GetErasureEncoder() func(shards, parities int) (ErasureEncoder, error) { 14 return erasureEncoderFunc 15 }