You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
863 B
51 lines
863 B
10 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"github.com/codegangsta/cli"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
app := cli.NewApp()
|
||
|
app.Name = "minio-encode"
|
||
|
app.Usage = "erasure encode a byte stream"
|
||
|
app.Commands = []cli.Command{
|
||
|
{
|
||
|
Name: "encode",
|
||
|
Usage: "erasure encode a byte stream",
|
||
|
Action: encode,
|
||
|
Flags: []cli.Flag{
|
||
|
cli.StringFlag{
|
||
|
Name: "output,o",
|
||
|
Value: "",
|
||
|
Usage: "Output file",
|
||
|
},
|
||
|
cli.StringFlag{
|
||
|
Name: "protection-level",
|
||
|
Value: "10,5",
|
||
|
Usage: "data,parity",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
Name: "decode",
|
||
|
Usage: "erasure decode a byte stream",
|
||
|
Action: decode,
|
||
|
Flags: []cli.Flag{
|
||
|
cli.StringFlag{
|
||
|
Name: "output,o",
|
||
|
Value: "",
|
||
|
Usage: "Output file",
|
||
|
},
|
||
|
cli.StringFlag{
|
||
|
Name: "protection-level",
|
||
|
Value: "10,5",
|
||
|
Usage: "data,parity",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
app.Run(os.Args)
|
||
|
}
|