gsfa

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EpochToSignatures

type EpochToSignatures map[uint64][]solana.Signature

func (EpochToSignatures) Count

func (e EpochToSignatures) Count() int

Count returns the number of signatures in the EpochToSignatures.

type GsfaReader

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

func NewGsfaReader

func NewGsfaReader(indexRootDir string) (*GsfaReader, error)

NewGsfaReader opens an existing index in READ-ONLY mode.

func (*GsfaReader) Close

func (index *GsfaReader) Close() error

func (*GsfaReader) Get

func (index *GsfaReader) Get(
	ctx context.Context,
	pk solana.PublicKey,
	limit int,
) ([]solana.Signature, error)

func (*GsfaReader) GetBeforeUntil

func (index *GsfaReader) GetBeforeUntil(
	ctx context.Context,
	pk solana.PublicKey,
	limit int,
	before *solana.Signature,
	until *solana.Signature,
) ([]solana.Signature, error)

func (*GsfaReader) GetEpoch

func (index *GsfaReader) GetEpoch() (uint64, bool)

func (*GsfaReader) Meta

func (index *GsfaReader) Meta() indexmeta.Meta

func (*GsfaReader) SetEpoch

func (index *GsfaReader) SetEpoch(epoch uint64)

func (*GsfaReader) Version

func (index *GsfaReader) Version() uint64

type GsfaReaderMultiepoch

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

func NewGsfaReaderMultiepoch

func NewGsfaReaderMultiepoch(epochs []*GsfaReader) (*GsfaReaderMultiepoch, error)

func (*GsfaReaderMultiepoch) Close

func (gsfa *GsfaReaderMultiepoch) Close() error

Close closes all the gsfa readers.

func (*GsfaReaderMultiepoch) Get

func (gsfa *GsfaReaderMultiepoch) Get(
	ctx context.Context,
	pk solana.PublicKey,
	limit int,
) (EpochToSignatures, error)

Get gets the signatures for the given public key.

func (*GsfaReaderMultiepoch) GetBeforeUntil

func (multi *GsfaReaderMultiepoch) GetBeforeUntil(
	ctx context.Context,
	pk solana.PublicKey,
	limit int,
	before *solana.Signature,
	until *solana.Signature,
) (EpochToSignatures, error)

type GsfaWriter

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

func NewGsfaWriter

func NewGsfaWriter(
	indexRootDir string,
	flushEveryXSigs uint64,
	meta indexmeta.Meta,
) (*GsfaWriter, error)

NewGsfaWriter creates or opens an existing index in WRITE mode.

func (*GsfaWriter) Close

func (a *GsfaWriter) Close() error

Close closes the accumulator.

func (*GsfaWriter) Flush

func (a *GsfaWriter) Flush() error

Flush forces a flush of the current batch to disk.

func (*GsfaWriter) Push

func (a *GsfaWriter) Push(slot uint64, signature solana.Signature, publicKeys []solana.PublicKey) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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