memory

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 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 RW

type RW struct {
	sync.Mutex
	Writes []*model.Entry
	// contains filtered or unexported fields
}

func New

func New() *RW

func (*RW) GetAccountTransactions

func (rw *RW) GetAccountTransactions(_ context.Context, account string, opts *history.ReadOptions) ([]*model.Entry, error)

GetAccountTransactions implements history.Writer.GetAccountTransactions.

func (*RW) GetLatestForAccount

func (rw *RW) GetLatestForAccount(_ context.Context, account string) (*model.Entry, error)

GetLatestForAccount implements history.Reader.GetLatestForAccount.

func (*RW) GetTransaction

func (rw *RW) GetTransaction(_ context.Context, txHash []byte) (*model.Entry, error)

GetTransaction implements history.Writer.GetTransaction.

func (*RW) Reset

func (rw *RW) Reset()

Reeset resets the recored writes.

func (*RW) Write

func (rw *RW) Write(_ context.Context, e *model.Entry) error

Write implements history.Writer.Write.

Jump to

Keyboard shortcuts

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