-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: index ad removal command #1859
Conversation
api/api.go
Outdated
@@ -41,6 +41,8 @@ type Boost interface { | |||
BoostDeal(ctx context.Context, dealUuid uuid.UUID) (*smtypes.ProviderDealState, error) //perm:admin | |||
BoostDealBySignedProposalCid(ctx context.Context, proposalCid cid.Cid) (*smtypes.ProviderDealState, error) //perm:admin | |||
BoostDummyDeal(context.Context, smtypes.DealParams) (*ProviderDealRejectionInfo, error) //perm:admin | |||
BoostIndexerAnnounceDealRemoved(ctx context.Context, pieceCid cid.Cid) (cid.Cid, error) //perm:admin | |||
LegacyDealByProposalCid(ctx context.Context, propCid cid.Cid) (storagemarket.MinerDeal, error) //perm:admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is added under Boost
MethodGroup, so maybe add Boost
prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. The reason to have it under Boost group is ensure compatibility after removing legacy markets.
@@ -454,6 +458,17 @@ func (s *BoostStub) BoostIndexerAnnounceAllDeals(p0 context.Context) error { | |||
return ErrNotSupported | |||
} | |||
|
|||
func (s *BoostStruct) BoostIndexerAnnounceDealRemoved(p0 context.Context, p1 cid.Cid) (cid.Cid, error) { | |||
if s.Internal.BoostIndexerAnnounceDealRemoved == nil { | |||
return *new(cid.Cid), ErrNotSupported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can just use cid.Undef
instead of *new(cid.Cid)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is auto generated by the make gen
. We might have to adjust the types in api gen for this. I am not sure if it is worth the required changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry, didn't notice this is the auto-generated part of the API.
This command will send an ad to IPNI to remove the indexes for a particular deal. This command is to be used for removing deals not being cleaned up by automated system in Boost.