generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider: refactor to only maintain one batched implementation and ad…
…d throughput callback
- Loading branch information
Showing
16 changed files
with
529 additions
and
1,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package provider | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/ipfs/go-cid" | ||
) | ||
|
||
type noopProvider struct{} | ||
|
||
var _ System = (*noopProvider)(nil) | ||
|
||
// NewNoopProvider creates a ProviderSystem that does nothing. | ||
func NewNoopProvider() System { | ||
return &noopProvider{} | ||
} | ||
|
||
func (op *noopProvider) Run() { | ||
} | ||
|
||
func (op *noopProvider) Close() error { | ||
return nil | ||
} | ||
|
||
func (op *noopProvider) Provide(cid.Cid) error { | ||
return nil | ||
} | ||
|
||
func (op *noopProvider) Reprovide(context.Context) error { | ||
return nil | ||
} | ||
|
||
func (op *noopProvider) Stat() (ReproviderStats, error) { | ||
return ReproviderStats{}, nil | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.