package main
import "fmt"
type myoss interface {
read(key string, offset, size int64) ([]byte, error)
put(src, key string) (int64, error)
get(key, dst string) (int64, error)
list(bucket, user, passwd string) []string
del(key string) ([]byte, error)
}
type myossc struct {
host []string
bucket string
part int64
up_concurrency int64
access_key string
secret_key string
}
func (c *myossc) read(key string, offset, size int64) ([]byte, error) {
fmt.Println("i am hlm oss read interface")
return nil, nil
}
func (c *myossc) put(src, key string) (int64, error) {
return 0, nil
}
func (c *myossc) get(key, dst string) (int64, error) {
return 0, nil
}
func (c *myossc) list(bucket, user, passwd string) []string {
return []string{}
}
func (c *myossc) del(key string) ([]byte, error) {
return nil, nil
}
func main() {
fmt.Println("ext-client-minio")
client := &myossc{
host: []string{"http://182.168.31.100/data{1..100}", "http://182.168.31.103/data{1..100}"},
bucket: "test",
part: 32,
up_concurrency: 8,
access_key: "minio123",
secret_key: "minio123",
}
client.read("/data/dir1/dir2/dir4", 10240, 2048)
}