-
Notifications
You must be signed in to change notification settings - Fork 16
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
Powergate 2.0 #296
Powergate 2.0 #296
Conversation
Signed-off-by: Aaron Sutula <hi@asutula.com>
Signed-off-by: Aaron Sutula <hi@asutula.com>
Signed-off-by: Aaron Sutula <hi@asutula.com>
Signed-off-by: Aaron Sutula <hi@asutula.com>
package.json
Outdated
@@ -69,9 +69,9 @@ | |||
} | |||
}, | |||
"dependencies": { | |||
"@textile/grpc-powergate-client": "^1.2.1", | |||
"@textile/grpc-powergate-client": "2.0.0-rc1", |
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.
Will update this to the official powergate release when it happens.
* @returns Pinned cids information of hot-storage. | ||
*/ | ||
pinnedCids: () => Promise<PinnedCidsResponse.AsObject> | ||
} |
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.
These methods were added in a previous powergate update but never added to the js client.
* @returns An object containing a list of storage info. | ||
*/ | ||
list: (userIds?: string[], cids?: string[]) => Promise<ListStorageInfoResponse.AsObject> | ||
} |
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.
New API for getting StorageInfo
data which describes the current storage state of data in powergate (data that is already/currenlty actually stored, not processing, queued, etc)
* @param opts Optional ListOptions to control the behavior of listing jobs. | ||
* @returns An object containing a list of storage jobs. | ||
*/ | ||
list: (opts?: AdminListOptions) => Promise<ListStorageJobsResponse.AsObject> |
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.
New list api which gives historical access and different options about how to query.
* @param cids A list of cids to filter the results by. | ||
* @returns An object containing a list of cid summary info. | ||
*/ | ||
cidSummary: (...cids: string[]) => Promise<CidSummaryResponse.AsObject> |
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.
New API to get a summary of cids in Powergate
@@ -190,9 +156,100 @@ describe("pow", () => { | |||
await waitForBalance(pow, res1.address, bal) | |||
}) | |||
}) | |||
|
|||
describe("data", () => { |
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.
Been keeping this integration test file up to date. It is a very thorough test of all the endpoints.
/** | ||
* Allows to import active on-chain deals to the Cid deals information. | ||
*/ | ||
importDealIds?: number[] | ||
|
||
/** | ||
* Allows to configure if a Job should ensure the new storage configuration. | ||
*/ | ||
noExec?: boolean |
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.
New options for importing deals and deferring job execution now supported in js client.
* @returns An object containing a list of storage info. | ||
*/ | ||
list: (...cids: string[]) => Promise<ListStorageInfoResponse.AsObject> | ||
} |
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.
New StorageInfo
apis at the user level (previous comment about StorageInfo
was for admin apis).
*/ | ||
latestSuccessful: (...cids: string[]) => Promise<LatestSuccessfulStorageJobsResponse.AsObject> | ||
list: (opts?: ListOptions) => Promise<ListStorageJobsResponse.AsObject> |
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.
StorageJob
listing at user level.
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 replaces many of the old apis deleted here.
Signed-off-by: Aaron Sutula <hi@asutula.com>
Description
Updates for Powergate 2.0 bindings.
Type of change
How Has This Been Tested?
Local testing, thorough integration tests have been updated.
Checklist: