backend

package
v0.0.0-...-0e0a456 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: BSD-3-Clause Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GravitonStore

type GravitonStore struct {
	DB       *graviton.Store
	DBFolder string
	DBPath   string
	DBTree   string

	DBMaxSnapshot uint64
	DBMigrateWait time.Duration
	Writing       int
	// contains filtered or unexported fields
}

func (*GravitonStore) GetSentTXs

func (g *GravitonStore) GetSentTXs() []*SendDetails

Gets Sent TX details

func (*GravitonStore) GetTXs

func (g *GravitonStore) GetTXs() []*TXDetails

Gets TX details

func (*GravitonStore) NewGravDB

func (g *GravitonStore) NewGravDB(poolhost, dbFolder, dbmigratewait string, dbmaxsnapshot uint64)

Builds new Graviton DB based on input from main()

func (*GravitonStore) StoreSentTX

func (g *GravitonStore) StoreSentTX(txDetails *SendDetails) error

Stores Sent TX details

func (*GravitonStore) StoreTX

func (g *GravitonStore) StoreTX(txDetails *TXDetails) error

Stores TX details

func (*GravitonStore) SwapGravDB

func (g *GravitonStore) SwapGravDB(poolhost, dbFolder string)

Swaps the store pointer from existing to new after copying latest snapshot to new DB - fast as cursor + disk writes allow [possible other alternatives such as mem store for some of these interwoven, testing needed]

type Messages

type Messages struct {
	MessageTXs []*TXDetails
}

type SendDetails

type SendDetails struct {
	TimeStamp int64
	Recipient string
	ScValue   string
	Key       []byte
}

type SentMessages

type SentMessages struct {
	SentTXs []*SendDetails
}

type TXDetails

type TXDetails struct {
	TimeStamp  int64
	Key        []byte
	ScValue    string
	Txid       string
	RawMessage string
	Sender     string
}

type TreeKV

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

Jump to

Keyboard shortcuts

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