storage

package
v0.0.0-...-6802d5b Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAtomicWriter

type IAtomicWriter interface {
	AppendBlock(block *types.Block) error
	PopLatestBlock() (*types.Block, error)
}

type IReader

type IReader interface {
	GetLatestBlock() (*types.Block, error)
	GetTransactions(address string) ([]*types.Transaction, error)
}

type IStorage

type IStorage interface {
	IReader
	IWriter
}

type IWriter

type IWriter interface {
	AtomicWrite(func(IAtomicWriter) error) error
	Subscribe(address string) error
	Unsubscribe(address string) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
The redisStorage is designed as a future improvement to utilize Redis as a storage, instead of the current in-memory storage.
The redisStorage is designed as a future improvement to utilize Redis as a storage, instead of the current in-memory storage.

Jump to

Keyboard shortcuts

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