remote

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Store)

func WithClient

func WithClient(
	executionClient executiondata.ExecutionDataAPIClient,
	accessClient access.AccessAPIClient,
) Option

WithClient can set an rpc host client

This is mostly use for testing.

func WithForkHeight added in v1.10.0

func WithForkHeight(height uint64) Option

WithStartBlockHeight sets the start height for the store. WithForkHeight sets the pinned fork height.

func WithForkHost added in v1.10.0

func WithForkHost(host string) Option

WithForkHost configures the remote access/observer node gRPC endpoint. Expects raw host:port with no scheme.

func WithRPCHost added in v0.62.0

func WithRPCHost(host string, chainID flowgo.ChainID) Option

WithRPCHost sets access/observer node host. Deprecated: use WithForkHost.

func WithStartBlockHeight added in v0.62.0

func WithStartBlockHeight(height uint64) Option

WithStartBlockHeight is deprecated: use WithForkHeight.

type Store

type Store struct {
	*sqlite.Store
	// contains filtered or unexported fields
}

func New

func New(provider *sqlite.Store, logger *zerolog.Logger, options ...Option) (*Store, error)

func (*Store) BlockByHeight

func (s *Store) BlockByHeight(ctx context.Context, height uint64) (*flowgo.Block, error)

func (*Store) BlockByID

func (s *Store) BlockByID(ctx context.Context, blockID flowgo.Identifier) (*flowgo.Block, error)

func (*Store) LatestBlock

func (s *Store) LatestBlock(ctx context.Context) (flowgo.Block, error)

func (*Store) LedgerByHeight

func (s *Store) LedgerByHeight(
	ctx context.Context,
	blockHeight uint64,
) (snapshot.StorageSnapshot, error)

func (*Store) Stop

func (s *Store) Stop()

Jump to

Keyboard shortcuts

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