Documentation ¶
Overview ¶
FCROfferMgr manages offer storage
Index ¶
- type FCROfferMgr
- func (mgr *FCROfferMgr) AddDHTOffer(offer *cidoffer.CIDOffer) error
- func (mgr *FCROfferMgr) AddGroupOffer(offer *cidoffer.CIDOffer) error
- func (mgr *FCROfferMgr) GetDHTOffers(c *cid.ContentID) ([]cidoffer.CIDOffer, bool)
- func (mgr *FCROfferMgr) GetDHTOffersWithinRange(cidMin, cidMax *cid.ContentID, maxOffers int) ([]cidoffer.CIDOffer, bool)
- func (mgr *FCROfferMgr) GetGroupOffers(c *cid.ContentID) ([]cidoffer.CIDOffer, bool)
- func (mgr *FCROfferMgr) GetOfferByDigest(digest [cidoffer.CIDOfferDigestSize]byte) (*cidoffer.CIDOffer, bool)
- func (mgr *FCROfferMgr) GetOffers(c *cid.ContentID) ([]cidoffer.CIDOffer, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FCROfferMgr ¶
type FCROfferMgr struct {
// contains filtered or unexported fields
}
func (*FCROfferMgr) AddDHTOffer ¶
func (mgr *FCROfferMgr) AddDHTOffer(offer *cidoffer.CIDOffer) error
AddDHTOffer stores a dht offer
func (*FCROfferMgr) AddGroupOffer ¶
func (mgr *FCROfferMgr) AddGroupOffer(offer *cidoffer.CIDOffer) error
AddGroupOffer stores a group offer
func (*FCROfferMgr) GetDHTOffers ¶
GetDHTOffers returns a list of dht offers that contain the given cid
func (*FCROfferMgr) GetDHTOffersWithinRange ¶
func (mgr *FCROfferMgr) GetDHTOffersWithinRange(cidMin, cidMax *cid.ContentID, maxOffers int) ([]cidoffer.CIDOffer, bool)
GetDHTOffersWithinRange returns a list of dht offers contains a cid within the given range
func (*FCROfferMgr) GetGroupOffers ¶
GetGroupOffers returns a list of group offers that contain the given cid
func (*FCROfferMgr) GetOfferByDigest ¶
func (mgr *FCROfferMgr) GetOfferByDigest(digest [cidoffer.CIDOfferDigestSize]byte) (*cidoffer.CIDOffer, bool)
GetOfferByDigest allows a gateway to be able to respond to a query to search for an offer by the offer digest
Click to show internal directories.
Click to hide internal directories.