Skip to content

Commit 20d81a1

Browse files
committed
delegated-routing: un-deprecate legacy delegated routing API
Since [IPIP-378](ipfs/specs#378) is not moving forward, the legacy API is not deprecated because there nothing to replace it.
1 parent 23312e7 commit 20d81a1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

routing/http/server/server.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ type DelegatedRouter interface {
7171
// Limit indicates the maximum amount of results to return; 0 means unbounded.
7272
FindProviders(ctx context.Context, cid cid.Cid, limit int) (iter.ResultIter[types.Record], error)
7373

74-
// Deprecated: protocol-agnostic provide is being worked on in [IPIP-378]:
75-
//
76-
// [IPIP-378]: https://github.com/ipfs/specs/pull/378
74+
// ProvideBitswap tells a delegated router to advertise the CIDs in the
75+
// request as content that is available over bitswap.
7776
ProvideBitswap(ctx context.Context, req *BitswapWriteProvideRequest) (time.Duration, error)
7877

7978
// FindPeers searches for peers who have the provided [peer.ID].
@@ -95,9 +94,8 @@ type DelegatedRouter interface {
9594
// Deprecated: use DelegatedRouter. ContentRouter will be removed in a future version.
9695
type ContentRouter = DelegatedRouter
9796

98-
// Deprecated: protocol-agnostic provide is being worked on in [IPIP-378]:
99-
//
100-
// [IPIP-378]: https://github.com/ipfs/specs/pull/378
97+
// BitswapWriteProvideRequest is a request for a delegated router to advertise
98+
// CIDs of content that is retrievable over bitswap.
10199
type BitswapWriteProvideRequest struct {
102100
Keys []cid.Cid
103101
Timestamp time.Time
@@ -106,9 +104,7 @@ type BitswapWriteProvideRequest struct {
106104
Addrs []multiaddr.Multiaddr
107105
}
108106

109-
// Deprecated: protocol-agnostic provide is being worked on in [IPIP-378]:
110-
//
111-
// [IPIP-378]: https://github.com/ipfs/specs/pull/378
107+
// WriteProvideRequest is a wrapper for any protocol-specific provide requests.
112108
type WriteProvideRequest struct {
113109
Protocol string
114110
Schema string

0 commit comments

Comments
 (0)