core

package
v0.0.0-...-2540013 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReSubscribeInterval     = time.Hour
	ReconnectInterval       = time.Minute
	MinConnectedSubscribers = 2
)

Variables

View Source
var (
	Topic *cid.Cid
)

Functions

This section is empty.

Types

type AtomicSwapNode

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

This struct contains the relevant components of our node that we'll need to run our atomic swap protocol.

func NewAtomicSwapNode

func NewAtomicSwapNode(repo *r.Repo, peerHost host.Host, routing *dht.IpfsDHT, floodsub *fs.PubSub) *AtomicSwapNode

func (*AtomicSwapNode) CloseOrder

func (n *AtomicSwapNode) CloseOrder(orderID string) error

func (*AtomicSwapNode) MsgChan

func (n *AtomicSwapNode) MsgChan() chan interface{}

func (*AtomicSwapNode) OrderBook

func (n *AtomicSwapNode) OrderBook() *ob.OrderBook

func (*AtomicSwapNode) PublishLimitOrder

func (n *AtomicSwapNode) PublishLimitOrder(quantity, price uint64, buyBTC bool) error

func (*AtomicSwapNode) SetWireService

func (n *AtomicSwapNode) SetWireService(ws *service.WireService)

func (*AtomicSwapNode) StartOnlineServices

func (n *AtomicSwapNode) StartOnlineServices()

Here we are going to set self as a subscriber in the dht and query the dht for other subscribers and open connections to a few of them.

Jump to

Keyboard shortcuts

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