ipfs / ipfs/kubo

Expose bitswap sessions through a global flag

Open
#5,994 5 comments 0 reactions 0 assignees View on GitHub
kind/enhancement need/community-input
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.