peerstore

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerCache

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

func NewPeerCache

func NewPeerCache(
	gcTime time.Duration,
	metricPrefix string,
) *PeerCache

func (*PeerCache) Get

Get -

func (*PeerCache) List

func (m *PeerCache) List() []*hyperspace.Announcement

List -

func (*PeerCache) Lookup

Lookup -

func (*PeerCache) Put

func (m *PeerCache) Put(
	p *hyperspace.Announcement,
	ttl time.Duration,
) (updated bool)

Put -

func (*PeerCache) Remove

func (m *PeerCache) Remove(k crypto.PublicKey)

Remove -

func (*PeerCache) Touch

func (m *PeerCache) Touch(k crypto.PublicKey, ttl time.Duration)

Put -

Jump to

Keyboard shortcuts

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