local

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExchange

func NewExchange(store header.Store) header.Exchange

NewExchange creates a new local Exchange.

Types

type Exchange

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

NewExchange is a simple Exchange that reads Headers from Store without any networking.

func (*Exchange) Get

func (*Exchange) GetByHeight

func (l *Exchange) GetByHeight(ctx context.Context, height uint64) (*header.ExtendedHeader, error)

func (*Exchange) GetRangeByHeight

func (l *Exchange) GetRangeByHeight(ctx context.Context, origin, amount uint64) ([]*header.ExtendedHeader, error)

func (*Exchange) Head

func (*Exchange) Start

func (l *Exchange) Start(context.Context) error

func (*Exchange) Stop

func (l *Exchange) Stop(context.Context) error

Jump to

Keyboard shortcuts

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