memory

package
v0.42.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HintDB

type HintDB struct {
	RelayBySerial         []string
	OrderedRelaysByPubKey map[string]RelaysForPubKey

	sync.Mutex
}

func NewHintDB

func NewHintDB() *HintDB

func (*HintDB) PrintScores

func (db *HintDB) PrintScores()

func (*HintDB) Save

func (db *HintDB) Save(pubkey string, relay string, key hints.HintKey, ts nostr.Timestamp)

func (*HintDB) TopN

func (db *HintDB) TopN(pubkey string, n int) []string

type RelayEntry

type RelayEntry struct {
	Relay      int
	Timestamps [7]nostr.Timestamp
}

func (RelayEntry) Sum

func (re RelayEntry) Sum() int64

type RelaysForPubKey

type RelaysForPubKey struct {
	Entries []RelayEntry
}

Jump to

Keyboard shortcuts

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