database

package
v0.0.0-...-5cd5815 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 4 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 {
	*sql.DB
}

func Init

func Init(path string) (*DB, error)

func (*DB) CreateOrUpdateNode

func (db *DB) CreateOrUpdateNode(node *peer.Node) (int64, error)

func (*DB) CreatePing

func (db *DB) CreatePing(id int64, ok bool) error

func (*DB) GetNodeID

func (db *DB) GetNodeID(node *peer.Node) (id int64, err error)

func (*DB) LoadAddrs

func (db *DB) LoadAddrs(ok bool) ([]*peer.Addr, error)

func (*DB) Update

func (db *DB) Update(node *peer.Node) error

Jump to

Keyboard shortcuts

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