runner

package
v0.0.1-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

type Query struct {
	MaxPrice  uint64
	PieceSize uint64
	Limit     int
	Offset    int
}

Query specifies filtering and paging data to retrieve active Asks.

type Runner

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

Runner contains cached information about markets.

func New

func New(ds datastore.TxnDatastore, api *apistruct.FullNodeStruct) (*Runner, error)

New returns a new ask index runner. It load a persisted ask index, and immediately starts building a new fresh one.

func (*Runner) Close

func (ai *Runner) Close() error

Close closes the AskIndex.

func (*Runner) Get

func (ai *Runner) Get() ask.Index

Get returns a copy of the current index data.

func (*Runner) Listen

func (ai *Runner) Listen() <-chan struct{}

Listen returns a new channel signaler that notifies when the index gets updated.

func (*Runner) Query

func (ai *Runner) Query(q Query) ([]ask.StorageAsk, error)

Query executes a query to retrieve active Asks.

func (*Runner) Unregister

func (ai *Runner) Unregister(c chan struct{})

Unregister unregisters a channel signaler from the signaler hub.

Jump to

Keyboard shortcuts

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