Documentation ¶
Overview ¶
filer
weed master
weed volume
weedo.go
Index ¶
- func AssignUpload(filename, mimeType string, file io.Reader) (fid string, size int64, err error)
- func AssignUploadArgs(filename, mimeType string, file io.Reader, args url.Values) (fid string, size int64, err error)
- func Delete(fid string, count int) (err error)
- type Client
- func (c *Client) AssignUpload(filename, mimeType string, file io.Reader) (fid string, size int64, err error)
- func (c *Client) AssignUploadArgs(filename, mimeType string, file io.Reader, args url.Values) (fid string, size int64, err error)
- func (c *Client) Delete(fid string, count int, collection ...string) (err error)
- func (c *Client) Filer(url string) *Filer
- func (c *Client) GetUrl(fid string, collection ...string) (publicUrl, url string, err error)
- func (c *Client) GetUrls(fid string, collection ...string) (locations []Location, err error)
- func (c *Client) Master() *Master
- func (c *Client) Volume(volumeId, collection string) (*Volume, error)
- type Dir
- type Fid
- type File
- type Filer
- type Location
- type Master
- func (m *Master) Assign() (string, error)
- func (m *Master) AssignArgs(args url.Values) (fid string, err error)
- func (m *Master) AssignN(count int) (fid string, err error)
- func (m *Master) GC(threshold float64) error
- func (m *Master) Grow(count int, collection, replication, dataCenter string) error
- func (m *Master) GrowArgs(args url.Values) error
- func (m *Master) Status() (err error)
- func (m *Master) Submit(filename, mimeType string, file io.Reader) (fid string, size int64, err error)
- func (m *Master) SubmitArgs(filename, mimeType string, file io.Reader, args url.Values) (fid string, size int64, err error)
- type Volume
- func (v *Volume) AssignVolume(volumeId uint64, replica string) error
- func (v *Volume) Delete(fid string, count int) (err error)
- func (v *Volume) PublicUrl() string
- func (v *Volume) Status() (err error)
- func (v *Volume) Submit(filename, mimeType string, file io.Reader) (fid string, size int64, err error)
- func (v *Volume) Upload(fid string, version int, filename, mimeType string, file io.Reader) (size int64, err error)
- func (v *Volume) Url() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignUpload ¶
First, contact with master server and assign a fid, then upload to volume server It is same as the follow steps curl http://localhost:9333/dir/assign curl -F file=@example.jpg http://127.0.0.1:8080/3,01637037d6
func AssignUploadArgs ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AssignUpload ¶
func (*Client) AssignUploadArgs ¶
type Dir ¶
type Master ¶
type Master struct {
Url string
}
func (*Master) AssignArgs ¶
v0.4 or later only
type Volume ¶
type Volume struct {
Locations []Location
}
func (*Volume) Submit ¶
func (v *Volume) Submit(filename, mimeType string, file io.Reader) (fid string, size int64, err error)
Upload File Directly
Click to show internal directories.
Click to hide internal directories.