mock

package
v4.0.0-...-e7c9483 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MutableSegment

type MutableSegment struct {
	Segment
	PutFunc    func(key, value []byte) error
	DeleteFunc func(key []byte) error
}

func (*MutableSegment) Delete

func (m *MutableSegment) Delete(key []byte) error

func (*MutableSegment) Put

func (m *MutableSegment) Put(key, value []byte) error

type Segment

type Segment struct {
	CloseFunc    func() error
	NameFunc     func() string
	PathFunc     func() string
	HasFunc      func(key []byte) (bool, error)
	GetFunc      func(key []byte) ([]byte, error)
	IteratorFunc func() ethdb.SegmentIterator
}

func (*Segment) Close

func (m *Segment) Close() error

func (*Segment) Get

func (m *Segment) Get(key []byte) ([]byte, error)

func (*Segment) Has

func (m *Segment) Has(key []byte) (bool, error)

func (*Segment) Iterator

func (m *Segment) Iterator() ethdb.SegmentIterator

func (*Segment) Name

func (m *Segment) Name() string

func (*Segment) Path

func (m *Segment) Path() string

type SegmentCompactor

type SegmentCompactor struct {
	CompactSegmentFunc   func(ctx context.Context, table string, s *ethdb.LDBSegment) (ethdb.Segment, error)
	UncompactSegmentFunc func(ctx context.Context, table string, s ethdb.Segment) (*ethdb.LDBSegment, error)
}

func (*SegmentCompactor) CompactSegment

func (m *SegmentCompactor) CompactSegment(ctx context.Context, table string, s *ethdb.LDBSegment) (ethdb.Segment, error)

func (*SegmentCompactor) UncompactSegment

func (m *SegmentCompactor) UncompactSegment(ctx context.Context, table string, s ethdb.Segment) (*ethdb.LDBSegment, error)

type SegmentOpener

type SegmentOpener struct {
	ListSegmentNamesFunc func(path, table string) ([]string, error)
	OpenSegmentFunc      func(table, name, path string) (ethdb.Segment, error)
}

func (*SegmentOpener) ListSegmentNames

func (m *SegmentOpener) ListSegmentNames(path, table string) ([]string, error)

func (*SegmentOpener) OpenSegment

func (m *SegmentOpener) OpenSegment(table, name, path string) (ethdb.Segment, error)

Jump to

Keyboard shortcuts

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