datasource

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockInfo

type BlockInfo struct {
	*model.BlockInfo
	PredecessorTimestamp time.Time `json:"predecessor_timestamp"`
	MinDelay             int64     `json:"minimal_delay"`
	Delay                int64     `json:"delay"`
}

type Datasource

type Datasource struct {
	DB     storage.BlockInfoStorage
	Client *client.Client
}

func (*Datasource) GetBlocksInfo

func (d *Datasource) GetBlocksInfo(ctx context.Context, start, end time.Time) ([]*BlockInfo, error)

func (*Datasource) MonitorBlockInfo

func (d *Datasource) MonitorBlockInfo(ctx context.Context) (blockInfo <-chan *BlockInfo, errors <-chan error, err error)

Jump to

Keyboard shortcuts

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