sessionrequestsplitter

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionRequestSplitter

type SessionRequestSplitter struct {
	// contains filtered or unexported fields
}

SessionRequestSplitter track how many duplicate and unique blocks come in and uses that to determine how much to split up each set of wants among peers.

func New

New returns a new SessionRequestSplitter.

func (*SessionRequestSplitter) RecordDuplicateBlock

func (srs *SessionRequestSplitter) RecordDuplicateBlock()

RecordDuplicateBlock records the fact that the session received a duplicate block and adjusts split factor as neccesary.

func (*SessionRequestSplitter) RecordUniqueBlock

func (srs *SessionRequestSplitter) RecordUniqueBlock()

RecordUniqueBlock records the fact that the session received a unique block and adjusts the split factor as neccesary.

func (*SessionRequestSplitter) SplitRequest

func (srs *SessionRequestSplitter) SplitRequest(optimizedPeers []bssd.OptimizedPeer, ks []cid.Cid) []bssd.PartialRequest

SplitRequest splits a request for the given cids one or more times among the given peers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL