Skip to content

Commit 8aa95cc

Browse files
Optimize DHT Symbol Retrieval: Primary-Provider Waves, Streamed Writes, and Bounded Concurrency (#227)
1 parent 1b48fe0 commit 8aa95cc

File tree

6 files changed

+662
-6
lines changed

6 files changed

+662
-6
lines changed

p2p/client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ type Client interface {
1818
// reqCount is the minimum number of keys that are actually required by the caller
1919
// to successfully perform the reuquired operation
2020
BatchRetrieve(ctx context.Context, keys []string, reqCount int, txID string, localOnly ...bool) (map[string][]byte, error)
21+
22+
BatchRetrieveStream(ctx context.Context, keys []string, required int32, txID string, onSymbol func(base58Key string, data []byte) error, localOnly ...bool) (written int32, err error)
23+
2124
// Store store data to the network, which will trigger the iterative store message
2225
// - the base58 encoded identifier will be returned
2326
Store(ctx context.Context, data []byte, typ int) (string, error)

0 commit comments

Comments
 (0)