storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PidsK            = 10
	CidsK            = 5
	DefaultPeersSize = 500  //1000
	DefaultCidsSize  = 1000 //10000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerStorage

type ServerStorage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewServerStorage

func NewServerStorage() *ServerStorage

func (*ServerStorage) AddCidRecord

func (st *ServerStorage) AddCidRecord(recs ...record.CidRecord)

func (*ServerStorage) GetRandomRecords

func (st *ServerStorage) GetRandomRecords() []record.CidRecord

func (*ServerStorage) InsertAndGetPeers

func (st *ServerStorage) InsertAndGetPeers(peer peer.AddrInfo) []peer.AddrInfo

Jump to

Keyboard shortcuts

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