Expose bitswap sessions through a global flag
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
We could expose sessions to commands through a global flag, which would take a random session id, and potentially some parameters, like timeout:
```
ipfs get --session-id=4e237431db9b4e6d425b-10m /some/path
ipfs get --session-id=4e237431db9b4e6d425b-10m /other/path
ipfs get --session-id=4e237431db9b4e6d425b-0 /yet/another/path
```
First invocation would create the session and store it somewhere, second and third would re-use it, after 3-rd get is done, the session would get removed.
We should also consider creating sort of 'session GC' to cleanup sessions in case we accumulate too many (and to make it safe to expose on gateway port)
cc @Stebalien @hannahhoward
Contributor guide
Assessment
This issue has not been assessed yet.