CopyBlock from one backend to another. It automatically chooses the encoding for the given block.
(ctx context.Context, meta *backend.BlockMeta, from backend.Reader, to backend.Writer)
| 149 | |
| 150 | // CopyBlock from one backend to another. It automatically chooses the encoding for the given block. |
| 151 | func CopyBlock(ctx context.Context, meta *backend.BlockMeta, from backend.Reader, to backend.Writer) error { |
| 152 | v, err := FromVersion(meta.Version) |
| 153 | if err != nil { |
| 154 | return err |
| 155 | } |
| 156 | return v.CopyBlock(ctx, meta, from, to) |
| 157 | } |
no test coverage detected