Interface IBlockRepositoryApi
Manages all the blocks stored locally.
Namespace: Ipfs.CoreApi
Assembly: Ipfs.Core.dll
Syntax
public interface IBlockRepositoryApi
Methods
| Improve this Doc View SourceRemoveGarbageAsync(CancellationToken)
Perform a garbage collection sweep on the repo.
Declaration
Task RemoveGarbageAsync(CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task | TODO: not sure what this should return. |
StatisticsAsync(CancellationToken)
Get statistics on the repository.
Declaration
Task<RepositoryData> StatisticsAsync(CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task<RepositoryData> | A task that represents the asynchronous operation. The task's result is the current RepositoryData. |
Remarks
Same as RepositoryAsync(CancellationToken).
VerifyAsync(CancellationToken)
Verify all blocks in repo are not corrupted.
Declaration
Task VerifyAsync(CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task | TODO: not sure what this should return. |
VersionAsync(CancellationToken)
Gets the version number of the repo.
Declaration
Task<string> VersionAsync(CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task<String> | A task that represents the asynchronous operation. The task's result is the version number of the data block repository. |