Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

api, chunk: progress bar support #1649

Merged
merged 12 commits into from
Aug 26, 2019
Merged

api, chunk: progress bar support #1649

merged 12 commits into from
Aug 26, 2019

Conversation

jmozah
Copy link
Collaborator

@jmozah jmozah commented Aug 5, 2019

This PR provides the HTTP api support to retrieve tag counters.

A new endpoint /bzz-tag/ is added to achieve this.
Instead of supplying the swarm hash, the tagID can also be supplied like /bzz-tag/?tagID=
The tag id of a uploaded file is returned in the response header.
Any client which wants to implement a progress bar will get this tagId and pull the counters using this API.

api/http/server.go Outdated Show resolved Hide resolved
api/http/server.go Outdated Show resolved Hide resolved
state/dbstore.go Show resolved Hide resolved
@acud
Copy link
Member

acud commented Aug 8, 2019

@jmozah i added some comments in the body of the PR.
also - please rebase on master

@jmozah jmozah requested a review from janos August 9, 2019 07:20
@jmozah
Copy link
Collaborator Author

jmozah commented Aug 9, 2019

@zelig In the GET API.. i currently send the entire tag structure as it is. @acud was talking about sending counters only based on Status(). I don't get it. Why should client be bothered about states? From the client perspective, he gets the counters and he decides what to do with them.

This is the only thing remaining in this PR for now.

chunk/tag.go Outdated Show resolved Hide resolved
api/http/server.go Outdated Show resolved Hide resolved
acud
acud previously approved these changes Aug 13, 2019
Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@acud acud changed the title WIP: Progress bar support api, chunk: progress bar support Aug 13, 2019
chunk/tags.go Outdated Show resolved Hide resolved
Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zelig zelig added the tags label Aug 14, 2019
Copy link
Member

@zelig zelig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments only
plus, could we get rid of custom marshalling?

api/http/server.go Outdated Show resolved Hide resolved
chunk/tag.go Outdated Show resolved Hide resolved
chunk/tag_test.go Outdated Show resolved Hide resolved
state/dbstore.go Outdated Show resolved Hide resolved
@skylenet skylenet added this to the 0.4.4 milestone Aug 14, 2019
Copy link
Member

@zelig zelig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove custom marshalling it is unnecessary

chunk/tag.go Outdated Show resolved Hide resolved
Copy link
Member

@acud acud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why the change to GetByAddress to handle string. should handle Address as was before

chunk/tag.go Outdated Show resolved Hide resolved
chunk/tag.go Outdated Show resolved Hide resolved
@zelig
Copy link
Member

zelig commented Aug 21, 2019

@acud acud merged commit 06a923e into ethersphere:master Aug 26, 2019
chadsr added a commit to chadsr/swarm that referenced this pull request Sep 23, 2019
* 'master' of github.com:ethersphere/swarm:
  pss: Modularize crypto and remove Whisper. Step 1 - isolate whisper code (ethersphere#1698)
  pss: Improve pressure backstop queue handling - no mutex (ethersphere#1695)
  cmd/swarm-snapshot: if 2 nodes to create snapshot use connectChain (ethersphere#1709)
  network: Add API for Capabilities (ethersphere#1675)
  pss: fixed flaky test that was using a global variable instead of a local one (ethersphere#1702)
  pss: Port tests to `network/simulation` (ethersphere#1682)
  storage: fix hasherstore seen check to happen when error is nil (ethersphere#1700)
  vendor: upgrade go-ethereum to 1.9.2 (ethersphere#1689)
  bzzeth: initial support for bzz-eth protocol (ethersphere#1571)
  network/stream: terminate runUpdateSyncing on peer quit (ethersphere#1696)
  all: first working SWAP version (ethersphere#1554)
  version: update to v0.5.0 unstable (ethersphere#1694)
  chunk, storage: storage with multi chunk Set method (ethersphere#1684)
  chunk, storage: add HasMulti to chunk.Store (ethersphere#1686)
  chunk, shed, storage: chunk.Store GetMulti method (ethersphere#1691)
  api, chunk: progress bar support (ethersphere#1649)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants