Documentation ¶
Index ¶
- Variables
- type ChunkDelivery
- type Peer
- type Retrieval
- func (r *Retrieval) APIs() []rpc.API
- func (r *Retrieval) Protocols() []p2p.Protocol
- func (r *Retrieval) RequestFromPeers(ctx context.Context, req *storage.Request, localID enode.ID) (*enode.ID, error)
- func (r *Retrieval) Run(p *p2p.Peer, rw p2p.MsgReadWriter) error
- func (r *Retrieval) Start(server *p2p.Server) error
- func (r *Retrieval) Stop() error
- type RetrieveRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoPeerFound = errors.New("no peer found")
)
Functions ¶
This section is empty.
Types ¶
type ChunkDelivery ¶
type ChunkDelivery struct { Addr storage.Address SData []byte // the stored chunk Data (incl size) }
ChunkDelivery is the protocol msg for delivering a solicited chunk to a peer
type Retrieval ¶
type Retrieval struct {
// contains filtered or unexported fields
}
Retrieval holds state and handles protocol messages for the `bzz-retrieve` protocol
func (*Retrieval) RequestFromPeers ¶
func (r *Retrieval) RequestFromPeers(ctx context.Context, req *storage.Request, localID enode.ID) (*enode.ID, error)
RequestFromPeers sends a chunk retrieve request to the next found peer
type RetrieveRequest ¶
RetrieveRequestMsg is the protocol msg for chunk retrieve requests
Click to show internal directories.
Click to hide internal directories.