remote

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 WithChainID

func WithChainID(ID flowgo.ChainID) Option

WithChainID sets a chain ID and is used to determine which archive node to use.

func WithClient

func WithClient(client archive.APIClient) Option

WithClient can set an archive node client

This is mostly use for testing.

func WithHost

func WithHost(host string) Option

WithHost sets archive node host.

type Store

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

func New

func New(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