offline.go 471 Bytes
Newer Older
1 2
package provider

3 4 5 6
import (
	"context"
	"github.com/ipfs/go-cid"
)
7

8
type offlineProvider struct{}
9

10 11
// NewOfflineProvider creates a ProviderSystem that does nothing
func NewOfflineProvider() System {
12 13 14
	return &offlineProvider{}
}

15 16
func (op *offlineProvider) Run() {
}
17

18
func (op *offlineProvider) Close() error {
19 20
	return nil
}
21

22 23 24 25 26
func (op *offlineProvider) Provide(_ cid.Cid) error {
	return nil
}

func (op *offlineProvider) Reprovide(_ context.Context) error {
27 28
	return nil
}