Migrate from ipfs/ipfs-cluster to ipfs-cluster/ipfs-cluster
This performs the necessary renamings.
This commit is contained in:
parent
34396ddb2c
commit
508791b547
750
CHANGELOG.md
750
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
|
@ -4,7 +4,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
|||
# This dockerfile builds and runs ipfs-cluster-service.
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
|
||||
ENV SRC_PATH $GOPATH/src/github.com/ipfs-cluster/ipfs-cluster
|
||||
ENV GO111MODULE on
|
||||
ENV GOPROXY https://proxy.golang.org
|
||||
|
||||
|
@ -41,7 +41,7 @@ FROM busybox:1-glibc
|
|||
MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
|
||||
ENV SRC_PATH /go/src/github.com/ipfs-cluster/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_CONSENSUS crdt
|
||||
ENV IPFS_CLUSTER_DATASTORE leveldb
|
||||
|
|
|
@ -6,7 +6,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
|||
|
||||
# This builder just builds the cluster binaries
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
|
||||
ENV SRC_PATH $GOPATH/src/github.com/ipfs-cluster/ipfs-cluster
|
||||
ENV GO111MODULE on
|
||||
ENV GOPROXY https://proxy.golang.org
|
||||
|
||||
|
@ -25,7 +25,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
|||
# built binaries on the go-ipfs-container.
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
|
||||
ENV SRC_PATH /go/src/github.com/ipfs-cluster/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_CONSENSUS crdt
|
||||
ENV IPFS_CLUSTER_DATASTORE leveldb
|
||||
|
|
|
@ -4,7 +4,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
|||
# This build state just builds the cluster binaries
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH $GOPATH/src/github.com/ipfs/ipfs-cluster
|
||||
ENV SRC_PATH $GOPATH/src/github.com/ipfs-cluster/ipfs-cluster
|
||||
ENV GO111MODULE on
|
||||
ENV GOPROXY https://proxy.golang.org
|
||||
|
||||
|
@ -27,7 +27,7 @@ MAINTAINER Hector Sanjuan <hector@protocol.ai>
|
|||
# built binaries on the go-ipfs-container.
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV SRC_PATH /go/src/github.com/ipfs/ipfs-cluster
|
||||
ENV SRC_PATH /go/src/github.com/ipfs-cluster/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_PATH /data/ipfs-cluster
|
||||
ENV IPFS_CLUSTER_CONSENSUS crdt
|
||||
ENV IPFS_CLUSTER_DATASTORE leveldb
|
||||
|
|
17
README.md
17
README.md
|
@ -2,14 +2,13 @@
|
|||
|
||||
|
||||
[![Made by](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
|
||||
[![Main project](https://img.shields.io/badge/project-ipfs-blue.svg?style=flat-square)](http://github.com/ipfs/ipfs)
|
||||
[![Main project](https://img.shields.io/badge/project-ipfs-cluster-blue.svg?style=flat-square)](http://github.com/ipfs-cluster)
|
||||
[![Matrix channel](https://img.shields.io/badge/matrix-%23ipfs--cluster-blue.svg?style=flat-square)](https://app.element.io/#/room/#ipfs-cluster:ipfs.io)
|
||||
[![GoDoc](https://godoc.org/github.com/ipfs/ipfs-cluster?status.svg)](https://godoc.org/github.com/ipfs/ipfs-cluster)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/ipfs/ipfs-cluster)](https://goreportcard.com/report/github.com/ipfs/ipfs-cluster)
|
||||
[![Build Status](https://travis-ci.com/ipfs/ipfs-cluster.svg?branch=master)](https://travis-ci.com/ipfs/ipfs-cluster)
|
||||
[![codecov](https://codecov.io/gh/ipfs/ipfs-cluster/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/ipfs-cluster)
|
||||
[![pkg.go.dev](https://pkg.go.dev/badge/github.com/ipfs-cluster/ipfs-cluster)](https://pkg.go.dev/github.com/ipfs-cluster/ipfs-cluster)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/ipfs-cluster/ipfs-cluster)](https://goreportcard.com/report/github.com/ipfs-cluster/ipfs-cluster)
|
||||
[![codecov](https://codecov.io/gh/ipfs-cluster/ipfs-cluster/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs-cluster/ipfs-cluster)
|
||||
|
||||
> Automated data availability and redundancy on IPFS
|
||||
> Pinset orchestration for IPFS
|
||||
|
||||
<p align="center">
|
||||
<img src="https://cluster.ipfs.io/cluster/png/IPFS_Cluster_color_no_text.png" alt="logo" width="300" height="300" />
|
||||
|
@ -17,9 +16,9 @@
|
|||
|
||||
IPFS Cluster provides data orchestration across a swarm of IPFS daemons by allocating, replicating and tracking a global pinset distributed among multiple peers.
|
||||
|
||||
It provides:
|
||||
There are 3 different applications:
|
||||
|
||||
* A cluster peer application: `ipfs-cluster-service`, to be run along with `go-ipfs`.
|
||||
* A cluster peer application: `ipfs-cluster-service`, to be run along with `go-ipfs` as a sidecar.
|
||||
* A client CLI application: `ipfs-cluster-ctl`, which allows easily interacting with the peer's HTTP API.
|
||||
* An additional "follower" peer application: `ipfs-cluster-follow`, focused on simplifying the process of configuring and running follower peers.
|
||||
|
||||
|
@ -71,4 +70,4 @@ PRs accepted. As part of the IPFS project, we have some [contribution guidelines
|
|||
|
||||
This library is dual-licensed under Apache 2.0 and MIT terms.
|
||||
|
||||
© 2020. Protocol Labs, Inc.
|
||||
© 2022. Protocol Labs, Inc.
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"time"
|
||||
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
"github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/ipfs/go-unixfs"
|
||||
"github.com/ipfs/ipfs-cluster/adder/ipfsadd"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/ipfsadd"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipld/go-car"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
"github.com/ipld/go-car"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ import (
|
|||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/adder/sharding"
|
||||
"github.com/ipfs/ipfs-cluster/adder/single"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/sharding"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/single"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
gopath "path"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
chunker "github.com/ipfs/go-ipfs-chunker"
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
adder "github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
adder "github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"fmt"
|
||||
|
||||
ipld "github.com/ipfs/go-ipld-format"
|
||||
"github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
)
|
||||
|
||||
// MockPinStore is used in VerifyShards
|
||||
|
|
|
@ -5,8 +5,8 @@ package single
|
|||
import (
|
||||
"context"
|
||||
|
||||
adder "github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
adder "github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
ipld "github.com/ipfs/go-ipld-format"
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
adder "github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
adder "github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"go.uber.org/multierr"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"go.opencensus.io/trace"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
)
|
||||
|
||||
// This file gathers allocation logic used when pinning or re-pinning
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"sort"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
api "github.com/ipfs/ipfs-cluster/api"
|
||||
api "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
)
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
api "github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
api "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
)
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import (
|
|||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
gopath "github.com/ipfs/go-path"
|
||||
types "github.com/ipfs/ipfs-cluster/api"
|
||||
state "github.com/ipfs/ipfs-cluster/state"
|
||||
types "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
state "github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
host "github.com/libp2p/go-libp2p-core/host"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
@ -170,7 +170,7 @@ func NewAPIWithHost(ctx context.Context, cfg *Config, h host.Host, routes func(*
|
|||
}
|
||||
|
||||
// See: https://github.com/ipfs/go-ipfs/issues/5168
|
||||
// See: https://github.com/ipfs/ipfs-cluster/issues/548
|
||||
// See: https://github.com/ipfs-cluster/ipfs-cluster/issues/548
|
||||
// on why this is re-enabled.
|
||||
s.SetKeepAlivesEnabled(true)
|
||||
s.MaxHeaderBytes = cfg.MaxHeaderBytes
|
||||
|
@ -239,7 +239,7 @@ func (api *API) setupLibp2p() error {
|
|||
if len(api.config.Libp2pListenAddr) > 0 {
|
||||
// We use a new host context. We will call
|
||||
// Close() on shutdown(). Avoids things like:
|
||||
// https://github.com/ipfs/ipfs-cluster/issues/853
|
||||
// https://github.com/ipfs-cluster/ipfs-cluster/issues/853
|
||||
h, err := libp2p.New(
|
||||
libp2p.Identity(api.config.PrivateKey),
|
||||
libp2p.ListenAddrs(api.config.Libp2pListenAddr...),
|
||||
|
|
|
@ -12,9 +12,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/common/test"
|
||||
rpctest "github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/common/test"
|
||||
rpctest "github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -20,7 +20,7 @@ import (
|
|||
"github.com/kelseyhightower/envconfig"
|
||||
"github.com/rs/cors"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
)
|
||||
|
||||
const minMaxHeaderBytes = 4096
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"time"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
types "github.com/ipfs/ipfs-cluster/api"
|
||||
types "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
crypto "github.com/libp2p/go-libp2p-core/crypto"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/kelseyhightower/envconfig"
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/version"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/version"
|
||||
)
|
||||
|
||||
// This file has the collection of header-related functions
|
||||
|
|
|
@ -21,9 +21,9 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/adder/adderutils"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/rpcutil"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/adderutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/rpcutil"
|
||||
|
||||
handlers "github.com/gorilla/handlers"
|
||||
mux "github.com/gorilla/mux"
|
||||
|
@ -190,7 +190,7 @@ func New(cfg *Config) (*Server, error) {
|
|||
}
|
||||
|
||||
// See: https://github.com/ipfs/go-ipfs/issues/5168
|
||||
// See: https://github.com/ipfs/ipfs-cluster/issues/548
|
||||
// See: https://github.com/ipfs-cluster/ipfs-cluster/issues/548
|
||||
// on why this is re-enabled.
|
||||
s.SetKeepAlivesEnabled(true) // A reminder that this can be changed
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
cmd "github.com/ipfs/go-ipfs-cmds"
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api/common"
|
||||
"github.com/ipfs/ipfs-cluster/api/pinsvcapi/pinsvc"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/common"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/pinsvcapi/pinsvc"
|
||||
)
|
||||
|
||||
const configKey = "pinsvcapi"
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
types "github.com/ipfs/ipfs-cluster/api"
|
||||
types "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -15,10 +15,10 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
types "github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/common"
|
||||
"github.com/ipfs/ipfs-cluster/api/pinsvcapi/pinsvc"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
types "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/common"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/pinsvcapi/pinsvc"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
"go.uber.org/multierr"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/common/test"
|
||||
"github.com/ipfs/ipfs-cluster/api/pinsvcapi/pinsvc"
|
||||
clustertest "github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/common/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/pinsvcapi/pinsvc"
|
||||
clustertest "github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
|
|
@ -1,21 +1,15 @@
|
|||
# ipfs-cluster client
|
||||
|
||||
|
||||
[![Made by](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
|
||||
[![Main project](https://img.shields.io/badge/project-ipfs-blue.svg?style=flat-square)](http://github.com/ipfs/ipfs)
|
||||
[![IRC channel](https://img.shields.io/badge/freenode-%23ipfs--cluster-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs-cluster)
|
||||
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
|
||||
[![GoDoc](https://godoc.org/github.com/ipfs/ipfs-cluster?status.svg)](https://godoc.org/github.com/ipfs/ipfs-cluster)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/ipfs/ipfs-cluster)](https://goreportcard.com/report/github.com/ipfs/ipfs-cluster)
|
||||
[![Build Status](https://travis-ci.org/ipfs/ipfs-cluster.svg?branch=master)](https://travis-ci.org/ipfs/ipfs-cluster)
|
||||
[![Coverage Status](https://coveralls.io/repos/github/ipfs/ipfs-cluster/badge.svg?branch=master)](https://coveralls.io/github/ipfs/ipfs-cluster?branch=master)
|
||||
[![Main project](https://img.shields.io/badge/project-ipfs-blue.svg?style=flat-square)](http://github.com/ipfs-cluster/ipfs-cluster)
|
||||
[![Matrix channel](https://img.shields.io/badge/matrix-%23ipfs--cluster-blue.svg?style=flat-square)](https://app.element.io/#/room/#ipfs-cluster:ipfs.io)
|
||||
[![pkg.go.dev](https://pkg.go.dev/badge/github.com/ipfs-cluster/ipfs-cluster)](https://pkg.go.dev/github.com/ipfs-cluster/ipfs-cluster/api/rest/client)
|
||||
|
||||
|
||||
> Go client for ipfs-cluster HTTP API.
|
||||
> Go client for the ipfs-cluster HTTP API.
|
||||
|
||||
This is a Go client library to use the ipfs-cluster REST HTTP API.
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Install](#install)
|
||||
|
@ -25,19 +19,19 @@ This is a Go client library to use the ipfs-cluster REST HTTP API.
|
|||
|
||||
## Install
|
||||
|
||||
You can import `github.com/ipfs/ipfs-cluster/api/rest/client` in your code.
|
||||
You can import `github.com/ipfs-cluster/ipfs-cluster/api/rest/client` in your code.
|
||||
|
||||
The code can be downloaded and tested with:
|
||||
|
||||
```
|
||||
$ go get -u -d github.com/ipfs/ipfs-cluster
|
||||
$ cd $GOPATH/src/github.com/ipfs/ipfs-cluster/rest/api/client
|
||||
$ git clone https://github.com/ipfs-cluster/ipfs-cluster.git
|
||||
$ cd ipfs-cluster/ipfs-cluster/rest/api/client
|
||||
$ go test -v
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Documentation can be read at [Godoc](https://godoc.org/github.com/ipfs/ipfs-cluster/api/rest/client).
|
||||
Documentation can be read at [pkg.go.dev](https://pkg.go.dev/github.com/ipfs-cluster/ipfs-cluster/api/rest/client).
|
||||
|
||||
## Contribute
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
shell "github.com/ipfs/go-ipfs-api"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
shell "github.com/ipfs/go-ipfs-api"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
gopath "github.com/ipfs/go-path"
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
types "github.com/ipfs/ipfs-cluster/api"
|
||||
rest "github.com/ipfs/ipfs-cluster/api/rest"
|
||||
test "github.com/ipfs/ipfs-cluster/test"
|
||||
types "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
rest "github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
test "github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"go.uber.org/multierr"
|
||||
|
||||
"go.opencensus.io/trace"
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/common"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/common"
|
||||
)
|
||||
|
||||
const configKey = "restapi"
|
||||
|
|
|
@ -17,9 +17,9 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/adder/adderutils"
|
||||
types "github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/common"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/adderutils"
|
||||
types "github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/common"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
test "github.com/ipfs/ipfs-cluster/api/common/test"
|
||||
clustertest "github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
test "github.com/ipfs-cluster/ipfs-cluster/api/common/test"
|
||||
clustertest "github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
pb "github.com/ipfs/ipfs-cluster/api/pb"
|
||||
pb "github.com/ipfs-cluster/ipfs-cluster/api/pb"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
|
|
16
cluster.go
16
cluster.go
|
@ -9,14 +9,14 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/adder"
|
||||
"github.com/ipfs/ipfs-cluster/adder/sharding"
|
||||
"github.com/ipfs/ipfs-cluster/adder/single"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs/ipfs-cluster/rpcutil"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs/ipfs-cluster/version"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/sharding"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/single"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/rpcutil"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/version"
|
||||
"go.uber.org/multierr"
|
||||
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
|
||||
ipfsconfig "github.com/ipfs/go-ipfs-config"
|
||||
pnet "github.com/libp2p/go-libp2p-core/pnet"
|
||||
|
|
|
@ -10,16 +10,16 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/adder/sharding"
|
||||
"github.com/ipfs/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs/ipfs-cluster/informer/numpin"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs/ipfs-cluster/pintracker/stateless"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs/ipfs-cluster/version"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/adder/sharding"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/numpin"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pintracker/stateless"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/version"
|
||||
|
||||
gopath "github.com/ipfs/go-path"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
ds "github.com/ipfs/go-datastore"
|
||||
namespace "github.com/ipfs/go-datastore/namespace"
|
||||
ipns "github.com/ipfs/go-ipns"
|
||||
config "github.com/ipfs/ipfs-cluster/config"
|
||||
config "github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
connmgr "github.com/libp2p/go-libp2p-connmgr"
|
||||
crypto "github.com/libp2p/go-libp2p-core/crypto"
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
dot "github.com/kishansagathiya/go-dot"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
)
|
||||
|
||||
/*
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/rest/client"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest/client"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
@ -62,7 +62,7 @@ part, or a /dnsaddr that resolves to it. Provide the cluster secret with
|
|||
--secret as needed.
|
||||
|
||||
For feedback, bug reports or any additional information, visit
|
||||
https://github.com/ipfs/ipfs-cluster.
|
||||
https://github.com/ipfs-cluster/ipfs-cluster.
|
||||
`,
|
||||
programName,
|
||||
programName,
|
||||
|
|
|
@ -9,20 +9,20 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
ipfscluster "github.com/ipfs/ipfs-cluster"
|
||||
"github.com/ipfs/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs/ipfs-cluster/observations"
|
||||
"github.com/ipfs/ipfs-cluster/pintracker/stateless"
|
||||
ipfscluster "github.com/ipfs-cluster/ipfs-cluster"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/observations"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pintracker/stateless"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"github.com/pkg/errors"
|
||||
cli "github.com/urfave/cli/v2"
|
||||
|
|
|
@ -9,9 +9,9 @@ import (
|
|||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api/rest/client"
|
||||
"github.com/ipfs/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs/ipfs-cluster/version"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest/client"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/version"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
|
@ -63,7 +63,7 @@ and a datastore associated to it, which are kept under
|
|||
"~/%s/<cluster_name>".
|
||||
|
||||
For feedback, bug reports or any additional information, visit
|
||||
https://github.com/ipfs/ipfs-cluster.
|
||||
https://github.com/ipfs-cluster/ipfs-cluster.
|
||||
|
||||
|
||||
EXAMPLES:
|
||||
|
|
|
@ -5,22 +5,22 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
ipfscluster "github.com/ipfs/ipfs-cluster"
|
||||
"github.com/ipfs/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs/ipfs-cluster/api/ipfsproxy"
|
||||
"github.com/ipfs/ipfs-cluster/api/pinsvcapi"
|
||||
"github.com/ipfs/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs/ipfs-cluster/informer/pinqueue"
|
||||
"github.com/ipfs/ipfs-cluster/informer/tags"
|
||||
"github.com/ipfs/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs/ipfs-cluster/observations"
|
||||
"github.com/ipfs/ipfs-cluster/pintracker/stateless"
|
||||
ipfscluster "github.com/ipfs-cluster/ipfs-cluster"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/ipfsproxy"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/pinsvcapi"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/pinqueue"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/tags"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/observations"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pintracker/stateless"
|
||||
"go.opencensus.io/tag"
|
||||
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"path"
|
||||
|
||||
fslock "github.com/ipfs/go-fs-lock"
|
||||
"github.com/ipfs/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/cmdutils"
|
||||
)
|
||||
|
||||
// lock logic heavily inspired by go-ipfs/repo/fsrepo/lock/lock.go
|
||||
|
|
|
@ -12,11 +12,11 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
ipfscluster "github.com/ipfs/ipfs-cluster"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs/ipfs-cluster/version"
|
||||
ipfscluster "github.com/ipfs-cluster/ipfs-cluster"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/version"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
||||
|
@ -83,7 +83,7 @@ default locations are ~/%s/%s
|
|||
and ~/%s/%s.
|
||||
|
||||
For feedback, bug reports or any additional information, visit
|
||||
https://github.com/ipfs/ipfs-cluster.
|
||||
https://github.com/ipfs-cluster/ipfs-cluster.
|
||||
|
||||
|
||||
EXAMPLES:
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/cmdutils"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/cmdutils"
|
||||
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
)
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/ipfs/go-datastore"
|
||||
ipfscluster "github.com/ipfs/ipfs-cluster"
|
||||
ipfshttp "github.com/ipfs/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
ipfscluster "github.com/ipfs-cluster/ipfs-cluster"
|
||||
ipfshttp "github.com/ipfs-cluster/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
host "github.com/libp2p/go-libp2p-core/host"
|
||||
dual "github.com/libp2p/go-libp2p-kad-dht/dual"
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
|
|
@ -7,24 +7,24 @@ import (
|
|||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
ipfscluster "github.com/ipfs/ipfs-cluster"
|
||||
"github.com/ipfs/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs/ipfs-cluster/api/ipfsproxy"
|
||||
"github.com/ipfs/ipfs-cluster/api/pinsvcapi"
|
||||
"github.com/ipfs/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs/ipfs-cluster/informer/numpin"
|
||||
"github.com/ipfs/ipfs-cluster/informer/pinqueue"
|
||||
"github.com/ipfs/ipfs-cluster/informer/tags"
|
||||
"github.com/ipfs/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs/ipfs-cluster/observations"
|
||||
"github.com/ipfs/ipfs-cluster/pintracker/stateless"
|
||||
ipfscluster "github.com/ipfs-cluster/ipfs-cluster"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/ipfsproxy"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/pinsvcapi"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/numpin"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/pinqueue"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/tags"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/observations"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pintracker/stateless"
|
||||
)
|
||||
|
||||
// Configs carries config types used by a Cluster Peer.
|
||||
|
|
|
@ -7,16 +7,16 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
|
||||
ipfscluster "github.com/ipfs/ipfs-cluster"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
ipfscluster "github.com/ipfs-cluster/ipfs-cluster"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
)
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
package ipfscluster
|
||||
|
||||
import (
|
||||
"github.com/ipfs/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs/ipfs-cluster/api/ipfsproxy"
|
||||
"github.com/ipfs/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs/ipfs-cluster/observations"
|
||||
"github.com/ipfs/ipfs-cluster/pintracker/stateless"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/ipfsproxy"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/observations"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pintracker/stateless"
|
||||
)
|
||||
|
||||
var testingClusterSecret, _ = DecodeClusterSecret("2588b80d5cb05374fa142aed6cbb047d1f4ef8ef15e37eba68c65b9d30df67ed")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package ipfscluster
|
||||
|
||||
import (
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs/ipfs-cluster/state/dsstate"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pstoremgr"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state/dsstate"
|
||||
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
namespace "github.com/ipfs/go-datastore/namespace"
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
ipns "github.com/ipfs/go-ipns"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs/ipfs-cluster/state/dsstate"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state/dsstate"
|
||||
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
|
@ -136,7 +136,7 @@ func (cc *Consensus) WaitForSync(ctx context.Context) error {
|
|||
|
||||
// Thus, waiting to be a Voter is a guarantee that we have a reasonable
|
||||
// up to date state. Otherwise, we might return too early (see
|
||||
// https://github.com/ipfs/ipfs-cluster/issues/378)
|
||||
// https://github.com/ipfs-cluster/ipfs-cluster/issues/378)
|
||||
|
||||
_, err := cc.raft.WaitForLeader(leaderCtx)
|
||||
if err != nil {
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs/ipfs-cluster/state/dsstate"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state/dsstate"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
host "github.com/libp2p/go-libp2p-core/host"
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"go.opencensus.io/tag"
|
||||
"go.opencensus.io/trace"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
|
||||
consensus "github.com/libp2p/go-libp2p-consensus"
|
||||
)
|
||||
|
|
|
@ -4,10 +4,10 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs/ipfs-cluster/state/dsstate"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state/dsstate"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
)
|
||||
|
||||
func TestApplyToPin(t *testing.T) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
|
||||
host "github.com/libp2p/go-libp2p-core/host"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/imdario/mergo"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
)
|
||||
|
||||
const configKey = "badger"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"path/filepath"
|
||||
|
||||
"github.com/imdario/mergo"
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
goleveldb "github.com/syndtr/goleveldb/leveldb/opt"
|
||||
)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/ipfs/ipfs-cluster
|
||||
module github.com/ipfs-cluster/ipfs-cluster
|
||||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.1
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -9,8 +9,8 @@ package ipfscluster
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
rpc "github.com/libp2p/go-libp2p-gorpc"
|
||||
|
|
|
@ -15,22 +15,22 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs/ipfs-cluster/observations"
|
||||
"github.com/ipfs/ipfs-cluster/pintracker/stateless"
|
||||
"github.com/ipfs/ipfs-cluster/state"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs/ipfs-cluster/version"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/allocator/balanced"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api/rest"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/crdt"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/consensus/raft"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/badger"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/inmem"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/datastore/leveldb"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/informer/disk"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/ipfsconn/ipfshttp"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/pubsubmon"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/observations"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/pintracker/stateless"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/state"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/version"
|
||||
|
||||
ds "github.com/ipfs/go-datastore"
|
||||
libp2p "github.com/libp2p/go-libp2p"
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
|
||||
ma "github.com/multiformats/go-multiaddr"
|
||||
)
|
||||
|
|
|
@ -17,8 +17,8 @@ import (
|
|||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/observations"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/observations"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
files "github.com/ipfs/go-ipfs-files"
|
||||
|
@ -1111,6 +1111,7 @@ func (ipfs *Connector) BlockStream(ctx context.Context, blocks <-chan api.NodeWi
|
|||
// Now we stream the blocks to ipfs. In case of error, we return
|
||||
// directly, but leave a goroutine draining the channel until it is
|
||||
// closed, which should be soon after returning.
|
||||
stats.Record(ctx, observations.BlocksPut.M(1))
|
||||
multiFileR := files.NewMultiFileReader(dir, true)
|
||||
contentType := "multipart/form-data; boundary=" + multiFileR.Boundary()
|
||||
body, err := ipfs.postCtxStreamResponse(ctx, url, contentType, multiFileR)
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
ma "github.com/multiformats/go-multiaddr"
|
||||
|
||||
merkledag "github.com/ipfs/go-merkledag"
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/test"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/test"
|
||||
)
|
||||
|
||||
func TestStoreLatest(t *testing.T) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
)
|
||||
|
||||
// DefaultWindowCap sets the amount of metrics to store per peer.
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
)
|
||||
|
||||
func makeMetric(value string) api.Metric {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/config"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/config"
|
||||
"github.com/kelseyhightower/envconfig"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
|
||||
"sync"
|
||||
|
||||
"github.com/ipfs/ipfs-cluster/api"
|
||||
"github.com/ipfs/ipfs-cluster/monitor/metrics"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/api"
|
||||
"github.com/ipfs-cluster/ipfs-cluster/monitor/metrics"
|
||||
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
peer "github.com/libp2p/go-libp2p-core/peer"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user