linkedlog

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KiB = 1024
	MiB = 1024 * KiB
	GiB = 1024 * MiB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkedLog

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

func NewLinkedLog

func NewLinkedLog(filename string) (*LinkedLog, error)

func (*LinkedLog) Close

func (s *LinkedLog) Close() error

func (*LinkedLog) Flush

func (s *LinkedLog) Flush() error

Flush flushes the cache to disk

func (*LinkedLog) Put

func (s *LinkedLog) Put(
	dataMap map[solana.PublicKey][]uint64,
	callbackBefore func(pk solana.PublicKey) (uint64, error),
	callbackAfter func(pk solana.PublicKey, offset uint64, ln uint32) error,
) (uint64, error)

Put map[PublicKey][]uint64 to file

func (*LinkedLog) Read

func (s *LinkedLog) Read(offset uint64) ([]uint64, uint64, error)

Read reads the block stored at the given offset.

Jump to

Keyboard shortcuts

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