ginuerzh / weedo Goto Github PK
View Code? Open in Web Editor NEWa SeaWeedFS client written in golang
Home Page: https://github.com/chrislusf/seaweedfs
License: Apache License 2.0
a SeaWeedFS client written in golang
Home Page: https://github.com/chrislusf/seaweedfs
License: Apache License 2.0
weedo.NewClient()
and related functions expect a hostname but the function parameter is called URL. this is confusing. Additionally passing a URL like "http://localhost.3030" returns a very unintuitive error:
parse http://http:%!F(MISSING)localhost:3030/dir/status: invalid URL escape "%!F(MISSING)"
It would be better to call the parameter host
or hostName
and maybe check the format.
After call the api http://localhost:9333/submit, but i want the resp.FileUrl to know which volume server
// Upload File Directly
func (m *Master) Submit(filename, mimeType string, file io.Reader) (fid string, size int64, err error) {
data, contentType, err := makeFormData(filename, mimeType, file)
if err != nil {
return
}
u := url.URL{
Scheme: "http",
Host: m.Url,
Path: "/submit",
}
resp, err := upload(u.String(), contentType, data)
if err == nil {
fid = resp.Fid
size = resp.Size
}
return
}
Client.Delete()
gives me following error: Error #01: {"size":961301}
but the entry was deleted and the error message indicates success.
I'm assuming the problem is:
if resp.StatusCode != http.StatusOK {
txt, _ := ioutil.ReadAll(resp.Body)
return errors.New(string(txt))
}
in del()
function in weedo.go
.
subj?
I got this error after using submit api to upload one image
type Client struct {
master *Master
volumes map[uint64]*Volume
filers map[string]*Filer
}
这里使用的map没有加锁不会有问题吗?还是这个加锁是交给了使用的人加。
json: cannot unmarshal array into Go struct field topology.DataCenters of type weedo.dataCenter
I guess this library is no longer compatible with the latest SeaweedFS version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.