db

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 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, addrs [][]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