1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00
Files
kubo/config/remotepin.go
Adin Schmahmann 2690c10bca go-ipfs-config: add support for pinning mfs (#116)
* add support for pinning mfs
* add pin conceal selector
* add RemoteServicesPath

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
2021-01-28 18:05:47 -05:00

34 lines
835 B
Go

package config
var (
RemoteServicesPath = "Pinning.RemoteServices"
PinningConcealSelector = []string{"Pinning", "RemoteServices", "*", "API", "Key"}
)
type Pinning struct {
RemoteServices map[string]RemotePinningService
}
type RemotePinningService struct {
API RemotePinningServiceAPI
Policies RemotePinningServicePolicies
}
type RemotePinningServiceAPI struct {
Endpoint string
Key string
}
type RemotePinningServicePolicies struct {
MFS RemotePinningServiceMFSPolicy
}
type RemotePinningServiceMFSPolicy struct {
// Enable enables watching for changes in MFS and re-pinning the MFS root cid whenever a change occurs.
Enable bool
// Name is the pin name for MFS.
PinName string
// RepinInterval determines the repin interval when the policy is enabled. In ns, us, ms, s, m, h.
RepinInterval string
}