1
0
mirror of https://github.com/minio/mc.git synced 2025-11-14 23:42:27 +03:00

ListOnChannel() - now listbuckets and objects through channel replies.

Still doesn't do full recursive of all objects based on marker, that is the next step.
This commit is contained in:
Harshavardhana
2015-04-23 17:59:25 -07:00
parent 431143f7d0
commit 527b1ca96d
7 changed files with 146 additions and 18 deletions

View File

@@ -110,6 +110,20 @@ func (f *fsClient) GetObjectMetadata() (item *client.Item, reterr error) {
return item, nil
}
func (f *fsClient) ListOnChannel() <-chan client.ItemOnChannel {
itemCh := make(chan client.ItemOnChannel)
go f.listInGoroutine(itemCh)
return itemCh
}
func (f *fsClient) listInGoroutine(itemCh chan client.ItemOnChannel) {
defer close(itemCh)
itemCh <- client.ItemOnChannel{
Item: nil,
Err: iodine.New(client.APINotImplemented{API: "ListOnChannel"}, nil),
}
}
// List - get a list of items
func (f *fsClient) List() (items []*client.Item, err error) {
visitFS := func(fp string, fi os.FileInfo, err error) error {