Documentation ¶
Overview ¶
package testonly provides helpers which are intended for use in tests.
Index ¶
- type MemStorage
- func (ms *MemStorage) Fetcher() client.Fetcher
- func (ms *MemStorage) GetTile(_ context.Context, level, index, logSize uint64) (*api.Tile, error)
- func (ms *MemStorage) ScanSequenced(_ context.Context, begin uint64, f func(seq uint64, entry []byte) error) (uint64, error)
- func (ms *MemStorage) Sequence(_ context.Context, leafhash []byte, leaf []byte) (uint64, error)
- func (ms *MemStorage) StoreTile(_ context.Context, level, index uint64, tile *api.Tile) error
- func (ms *MemStorage) WriteCheckpoint(_ context.Context, newCPRaw []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemStorage ¶
func NewMemStorage ¶
func NewMemStorage() *MemStorage
func (*MemStorage) Fetcher ¶
func (ms *MemStorage) Fetcher() client.Fetcher
func (*MemStorage) ScanSequenced ¶
func (ms *MemStorage) ScanSequenced(_ context.Context, begin uint64, f func(seq uint64, entry []byte) error) (uint64, error)
ScanSequenced calls f for each contiguous sequenced log entry >= begin. It should stop scanning if the call to f returns an error.
func (*MemStorage) Sequence ¶
Sequence assigns sequence numbers to the passed in entry. Returns the assigned sequence number for the leafhash.
If a duplicate leaf is sequenced the storage implementation may return the sequence number associated with an earlier instance, along with a ErrDupeLeaf error.
func (*MemStorage) WriteCheckpoint ¶
func (ms *MemStorage) WriteCheckpoint(_ context.Context, newCPRaw []byte) error
WriteCheckpoint stores a newly updated log checkpoint.
Click to show internal directories.
Click to hide internal directories.