Documentation
¶
Index ¶
- type SessionWantlist
- func (swl *SessionWantlist) Add(ks []cid.Cid, ses uint64)
- func (swl *SessionWantlist) Has(ks []cid.Cid) *cid.Set
- func (swl *SessionWantlist) Keys() []cid.Cid
- func (swl *SessionWantlist) RemoveKeys(ks []cid.Cid)
- func (swl *SessionWantlist) RemoveSession(ses uint64) []cid.Cid
- func (swl *SessionWantlist) RemoveSessionKeys(ses uint64, ks []cid.Cid)
- func (swl *SessionWantlist) SessionHas(ses uint64, ks []cid.Cid) *cid.Set
- func (swl *SessionWantlist) SessionsFor(ks []cid.Cid) []uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionWantlist ¶
The SessionWantList keeps track of which sessions want a CID
func NewSessionWantlist ¶
func NewSessionWantlist() *SessionWantlist
func (*SessionWantlist) Add ¶
func (swl *SessionWantlist) Add(ks []cid.Cid, ses uint64)
The given session wants the keys
func (*SessionWantlist) Has ¶
func (swl *SessionWantlist) Has(ks []cid.Cid) *cid.Set
Filter for keys that at least one session wants
func (*SessionWantlist) Keys ¶
func (swl *SessionWantlist) Keys() []cid.Cid
All keys wanted by all sessions
func (*SessionWantlist) RemoveKeys ¶
func (swl *SessionWantlist) RemoveKeys(ks []cid.Cid)
Remove the keys for all sessions. Called when blocks are received.
func (*SessionWantlist) RemoveSession ¶
func (swl *SessionWantlist) RemoveSession(ses uint64) []cid.Cid
Remove the session's wants, and return wants that are no longer wanted by any session.
func (*SessionWantlist) RemoveSessionKeys ¶
func (swl *SessionWantlist) RemoveSessionKeys(ses uint64, ks []cid.Cid)
Remove the session's wants
func (*SessionWantlist) SessionHas ¶
Filter for keys that the given session wants
func (*SessionWantlist) SessionsFor ¶
func (swl *SessionWantlist) SessionsFor(ks []cid.Cid) []uint64
All sessions that want the given keys
Click to show internal directories.
Click to hide internal directories.