Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
go-ipfs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
ipfs
go-ipfs
Commits
10de1656
Unverified
Commit
10de1656
authored
Jul 3, 2019
by
Michael Avila
Browse files
Options
Downloads
Patches
Plain Diff
Change to construct provider from go-ipfs-provider
parent
40af13e8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/core.go
+1
-1
1 addition, 1 deletion
core/core.go
core/coreapi/coreapi.go
+1
-1
1 addition, 1 deletion
core/coreapi/coreapi.go
core/node/provider.go
+14
-5
14 additions, 5 deletions
core/node/provider.go
with
16 additions
and
7 deletions
core/core.go
+
1
−
1
View file @
10de1656
...
@@ -23,12 +23,12 @@ import (
...
@@ -23,12 +23,12 @@ import (
ipnsrp
"github.com/ipfs/go-ipfs/namesys/republisher"
ipnsrp
"github.com/ipfs/go-ipfs/namesys/republisher"
"github.com/ipfs/go-ipfs/p2p"
"github.com/ipfs/go-ipfs/p2p"
"github.com/ipfs/go-ipfs/pin"
"github.com/ipfs/go-ipfs/pin"
"github.com/ipfs/go-ipfs/provider"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs/repo"
bserv
"github.com/ipfs/go-blockservice"
bserv
"github.com/ipfs/go-blockservice"
bstore
"github.com/ipfs/go-ipfs-blockstore"
bstore
"github.com/ipfs/go-ipfs-blockstore"
exchange
"github.com/ipfs/go-ipfs-exchange-interface"
exchange
"github.com/ipfs/go-ipfs-exchange-interface"
"github.com/ipfs/go-ipfs-provider"
ipld
"github.com/ipfs/go-ipld-format"
ipld
"github.com/ipfs/go-ipld-format"
logging
"github.com/ipfs/go-log"
logging
"github.com/ipfs/go-log"
mfs
"github.com/ipfs/go-mfs"
mfs
"github.com/ipfs/go-mfs"
...
...
This diff is collapsed.
Click to expand it.
core/coreapi/coreapi.go
+
1
−
1
View file @
10de1656
...
@@ -22,13 +22,13 @@ import (
...
@@ -22,13 +22,13 @@ import (
"github.com/ipfs/go-ipfs/core/node"
"github.com/ipfs/go-ipfs/core/node"
"github.com/ipfs/go-ipfs/namesys"
"github.com/ipfs/go-ipfs/namesys"
"github.com/ipfs/go-ipfs/pin"
"github.com/ipfs/go-ipfs/pin"
"github.com/ipfs/go-ipfs/provider"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs/repo"
bserv
"github.com/ipfs/go-blockservice"
bserv
"github.com/ipfs/go-blockservice"
"github.com/ipfs/go-ipfs-blockstore"
"github.com/ipfs/go-ipfs-blockstore"
"github.com/ipfs/go-ipfs-exchange-interface"
"github.com/ipfs/go-ipfs-exchange-interface"
offlinexch
"github.com/ipfs/go-ipfs-exchange-offline"
offlinexch
"github.com/ipfs/go-ipfs-exchange-offline"
"github.com/ipfs/go-ipfs-provider"
offlineroute
"github.com/ipfs/go-ipfs-routing/offline"
offlineroute
"github.com/ipfs/go-ipfs-routing/offline"
ipld
"github.com/ipfs/go-ipld-format"
ipld
"github.com/ipfs/go-ipld-format"
logging
"github.com/ipfs/go-log"
logging
"github.com/ipfs/go-log"
...
...
This diff is collapsed.
Click to expand it.
core/node/provider.go
+
14
−
5
View file @
10de1656
...
@@ -6,10 +6,13 @@ import (
...
@@ -6,10 +6,13 @@ import (
"time"
"time"
"github.com/ipfs/go-ipfs/core/node/helpers"
"github.com/ipfs/go-ipfs/core/node/helpers"
"github.com/ipfs/go-ipfs/provider"
"github.com/ipfs/go-ipfs/pin"
q
"github.com/ipfs/go-ipfs/provider/queue"
"github.com/ipfs/go-ipfs/provider/simple"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs/repo"
"github.com/ipfs/go-ipfs-provider"
q
"github.com/ipfs/go-ipfs-provider/queue"
"github.com/ipfs/go-ipfs-provider/simple"
ipld
"github.com/ipfs/go-ipld-format"
"github.com/libp2p/go-libp2p-core/routing"
"github.com/libp2p/go-libp2p-core/routing"
"go.uber.org/fx"
"go.uber.org/fx"
)
)
...
@@ -101,9 +104,9 @@ func SimpleProviders(reprovideStrategy string, reprovideInterval string) fx.Opti
...
@@ -101,9 +104,9 @@ func SimpleProviders(reprovideStrategy string, reprovideInterval string) fx.Opti
case
""
:
case
""
:
keyProvider
=
fx
.
Provide
(
simple
.
NewBlockstoreProvider
)
keyProvider
=
fx
.
Provide
(
simple
.
NewBlockstoreProvider
)
case
"roots"
:
case
"roots"
:
keyProvider
=
fx
.
Provide
(
simple
.
NewP
innedProvider
(
true
))
keyProvider
=
fx
.
Provide
(
p
innedProvider
Strategy
(
true
))
case
"pinned"
:
case
"pinned"
:
keyProvider
=
fx
.
Provide
(
simple
.
NewP
innedProvider
(
false
))
keyProvider
=
fx
.
Provide
(
p
innedProvider
Strategy
(
false
))
default
:
default
:
return
fx
.
Error
(
fmt
.
Errorf
(
"unknown reprovider strategy '%s'"
,
reprovideStrategy
))
return
fx
.
Error
(
fmt
.
Errorf
(
"unknown reprovider strategy '%s'"
,
reprovideStrategy
))
}
}
...
@@ -115,3 +118,9 @@ func SimpleProviders(reprovideStrategy string, reprovideInterval string) fx.Opti
...
@@ -115,3 +118,9 @@ func SimpleProviders(reprovideStrategy string, reprovideInterval string) fx.Opti
fx
.
Provide
(
SimpleReprovider
(
reproviderInterval
)),
fx
.
Provide
(
SimpleReprovider
(
reproviderInterval
)),
)
)
}
}
func
pinnedProviderStrategy
(
onlyRoots
bool
)
interface
{}
{
return
func
(
pinner
pin
.
Pinner
,
dag
ipld
.
DAGService
)
simple
.
KeyChanFunc
{
return
simple
.
NewPinnedProvider
(
onlyRoots
,
pinner
,
dag
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment