db

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBClient

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

func NewDBClient

func NewDBClient(
	ctx context.Context,
	loginStr string,
	initialized bool,
	reset bool) (*DBClient, error)

func (*DBClient) Close

func (c *DBClient) Close()

func (*DBClient) InsertEnr

func (d *DBClient) InsertEnr(enr *discv5.EnrNode) error

Insert ENR in the DB insert into the db if new one, update the data if the ENR has a higher Seq number

func (*DBClient) InsertIntoDB

func (c *DBClient) InsertIntoDB(persItem interface{})

func (*DBClient) UpdateEnr

func (d *DBClient) UpdateEnr(enr *discv5.EnrNode) error

Update ENR in the DB insert into the db if new one, update the data if the ENR has a higher Seq number

func (*DBClient) UpdateInDB

func (c *DBClient) UpdateInDB(persItem interface{})

type PersistableItem

type PersistableItem struct {
	Action dbAction
	Item   interface{}
}

Jump to

Keyboard shortcuts

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