core

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 38 Imported by: 8

Documentation

Overview

Package core contains everything needed to configure and run a 0x Mesh node.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(config Config) (*App, error)

func (*App) AddOrders

func (app *App) AddOrders(signedOrdersRaw []*json.RawMessage, pinned bool) (*ordervalidator.ValidationResults, error)

AddOrders can be used to add orders to Mesh. It validates the given orders and if they are valid, will store and eventually broadcast the orders to peers. If pinned is true, the orders will be marked as pinned, which means they will only be removed if they become unfillable and will not be removed due to having a high expiration time or any incentive mechanisms.

func (*App) AddPeer

func (app *App) AddPeer(peerInfo peerstore.PeerInfo) error

AddPeer can be used to manually connect to a new peer.

func (*App) GetMessagesToShare

func (app *App) GetMessagesToShare(max int) ([][]byte,