-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce first strategic provider: do nothing
License: MIT Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
- Loading branch information
1 parent
5fd5d44
commit 9a17914
Showing
24 changed files
with
604 additions
and
406 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 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
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
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 |
---|---|---|
@@ -1,20 +1,28 @@ | ||
package provider | ||
|
||
import "github.com/ipfs/go-cid" | ||
import ( | ||
"context" | ||
"github.com/ipfs/go-cid" | ||
) | ||
|
||
type offlineProvider struct{} | ||
|
||
// NewOfflineProvider creates a Provider that does nothing | ||
func NewOfflineProvider() Provider { | ||
// NewOfflineProvider creates a ProviderSystem that does nothing | ||
func NewOfflineProvider() System { | ||
return &offlineProvider{} | ||
} | ||
|
||
func (op *offlineProvider) Run() {} | ||
func (op *offlineProvider) Run() { | ||
} | ||
|
||
func (op *offlineProvider) Provide(cid cid.Cid) error { | ||
func (op *offlineProvider) Close() error { | ||
return nil | ||
} | ||
|
||
func (op *offlineProvider) Close() error { | ||
func (op *offlineProvider) Provide(_ cid.Cid) error { | ||
return nil | ||
} | ||
|
||
func (op *offlineProvider) Reprovide(_ context.Context) error { | ||
return nil | ||
} |
Oops, something went wrong.