sessiondata.go 417 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package sessiondata

import (
	cid "github.com/ipfs/go-cid"
	peer "github.com/libp2p/go-libp2p-core/peer"
)

// OptimizedPeer describes a peer and its level of optimization from 0 to 1.
type OptimizedPeer struct {
	Peer               peer.ID
	OptimizationRating float64
}

// PartialRequest is represents one slice of an over request split among peers
type PartialRequest struct {
	Peers []peer.ID
	Keys  []cid.Cid
}