db

package
v0.0.0-...-a67d1cc Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func OpenDB

func OpenDB(ctx context.Context, path string) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) CountRegistrations

func (db *DB) CountRegistrations(p peer.ID) (int, error)

func (*DB) Discover

func (db *DB) Discover(ns string, cookie []byte, limit int) ([]dbi.RegistrationRecord, []byte, error)

func (*DB) Register

func (db *DB) Register(p peer.ID, ns string, signedPeerRecord []byte, ttl int) (uint64, error)

func (*DB) Unregister

func (db *DB) Unregister(p peer.ID, ns string) error

func (*DB) ValidCookie

func (db *DB) ValidCookie(ns string, cookie []byte) bool

Jump to

Keyboard shortcuts

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