Documentation ¶
Index ¶
- Constants
- type BitVector
- type BitVectorInfo
- type ChunkInfo
- func (ci *ChunkInfo) API() rpc.API
- func (ci *ChunkInfo) CancelFindChunkInfo(rootCid boson.Address)
- func (ci *ChunkInfo) Discover(ctx context.Context, authInfo []byte, rootCid boson.Address, chain bool) bool
- func (ci *ChunkInfo) FindChunkInfo(ctx context.Context, authInfo []byte, rootCid boson.Address, ...) bool
- func (ci *ChunkInfo) FindRoutes(_ context.Context, rootCid boson.Address, index int64) []aco.Route
- func (ci *ChunkInfo) Metrics() []prometheus.Collector
- func (ci *ChunkInfo) OnFileUpload(ctx context.Context, rootCid boson.Address, length int64) error
- func (ci *ChunkInfo) OnRetrieved(ctx context.Context, rootCid boson.Address, index int64, overlay boson.Address) error
- func (ci *ChunkInfo) OnTransferred(_ context.Context, rootCid boson.Address, index int64, overlay boson.Address) error
- func (ci *ChunkInfo) Protocol() p2p.ProtocolSpec
- func (ci *ChunkInfo) PublishDownloadProgress(rootCid boson.Address, bitV BitVectorInfo)
- func (ci *ChunkInfo) PublishRetrievalProgress(rootCid boson.Address, bitV BitVectorInfo)
- func (ci *ChunkInfo) PublishRootCidStatus(statusEvent RootCidStatusEven)
- func (ci *ChunkInfo) SubscribeDownloadProgress(notifier *rpc.Notifier, sub *rpc.Subscription, rootCids []boson.Address)
- func (ci *ChunkInfo) SubscribeRetrievalProgress(notifier *rpc.Notifier, sub *rpc.Subscription, rootCid boson.Address)
- func (ci *ChunkInfo) SubscribeRootCidStatus(notifier *rpc.Notifier, sub *rpc.Subscription)
- type Interface
- type Pull
- type RootCidStatus
- type RootCidStatusEven
Constants ¶
View Source
const ( PullMax = 200 PullingMax = 10 PullerMax = 1000 )
View Source
const ( TimeOut = 30 Time = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitVectorInfo ¶
type ChunkInfo ¶
type ChunkInfo struct {
// contains filtered or unexported fields
}
func (*ChunkInfo) CancelFindChunkInfo ¶ added in v1.1.2
func (*ChunkInfo) FindChunkInfo ¶
func (*ChunkInfo) FindRoutes ¶
func (*ChunkInfo) Metrics ¶
func (ci *ChunkInfo) Metrics() []prometheus.Collector
func (*ChunkInfo) OnFileUpload ¶
func (*ChunkInfo) OnRetrieved ¶
func (*ChunkInfo) OnTransferred ¶
func (*ChunkInfo) Protocol ¶
func (ci *ChunkInfo) Protocol() p2p.ProtocolSpec
func (*ChunkInfo) PublishDownloadProgress ¶
func (ci *ChunkInfo) PublishDownloadProgress(rootCid boson.Address, bitV BitVectorInfo)
func (*ChunkInfo) PublishRetrievalProgress ¶
func (ci *ChunkInfo) PublishRetrievalProgress(rootCid boson.Address, bitV BitVectorInfo)
func (*ChunkInfo) PublishRootCidStatus ¶
func (ci *ChunkInfo) PublishRootCidStatus(statusEvent RootCidStatusEven)
func (*ChunkInfo) SubscribeDownloadProgress ¶
func (*ChunkInfo) SubscribeRetrievalProgress ¶
func (*ChunkInfo) SubscribeRootCidStatus ¶
func (ci *ChunkInfo) SubscribeRootCidStatus(notifier *rpc.Notifier, sub *rpc.Subscription)
type Interface ¶
type Interface interface { Discover(ctx context.Context, auth []byte, rootCid boson.Address, isOracle bool) bool FindRoutes(ctx context.Context, rootCid boson.Address, bit int64) []aco.Route OnRetrieved(ctx context.Context, rootCid boson.Address, bit int64, overlay boson.Address) error OnTransferred(ctx context.Context, rootCid boson.Address, bit int64, overlay boson.Address) error OnFileUpload(ctx context.Context, rootCid boson.Address, bitLen int64) error CancelFindChunkInfo(rootCid boson.Address) }
type RootCidStatus ¶
type RootCidStatus = int
const ( RootCid_DEL RootCidStatus = iota RootCid_ADD )
type RootCidStatusEven ¶
type RootCidStatusEven struct { RootCid boson.Address Status RootCidStatus }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.