package
Version:
v1.41.2
Opens a new window with list of versions in this module.
Published: Mar 27, 2022
License: MPL-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
type Block
-
type Cache
-
func (me *Cache[Peer, BlockKey, Hash]) CheckBlock(key BlockKey, data []byte) (bad []Peer)
-
func (me *Cache[Peer, BlockKey, Hash]) ForgetBlock(key BlockKey)
-
func (me *Cache[Peer, BlockKey, Hash]) Init()
-
func (me *Cache[Peer, BlockKey, Hash]) RecordBlock(peer Peer, key BlockKey, data []byte)
type Block[Key any] struct {
Key Key
Data []byte
}
type Cache[Peer, BlockKey, Hash comparable] struct {
Hash func([]byte) Hash
}
func (me *Cache[Peer, BlockKey, Hash]) CheckBlock(key BlockKey, data []byte) (bad []Peer)
func (me *Cache[Peer, BlockKey, Hash]) ForgetBlock(key BlockKey)
func (me *Cache[Peer, BlockKey, Hash]) Init()
func (me *Cache[Peer, BlockKey, Hash]) RecordBlock(peer Peer, key BlockKey, data []byte)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.