types

package
v0.4.31 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmarks

type Benchmarks sonm.Benchmarks

type Corder

type Corder struct {
	*sonm.Order
	// contains filtered or unexported fields
}

func (*Corder) AsBID

func (co *Corder) AsBID() *sonm.BidOrder

func (*Corder) GetHashrate

func (co *Corder) GetHashrate() uint64

func (*Corder) Hash added in v0.4.12

func (co *Corder) Hash() string

func (*Corder) IsReplaceable

func (co *Corder) IsReplaceable(newPrice *big.Int, delta float64) bool

func (*Corder) RestorePrice

func (co *Corder) RestorePrice() *big.Int

type CorderCancelTuple

type CorderCancelTuple struct {
	Corder *Corder
	Delay  time.Duration
}

func NewCorderCancelTuple

func NewCorderCancelTuple(c *Corder) *CorderCancelTuple

func (*CorderCancelTuple) WithIncreasedDelay

func (c *CorderCancelTuple) WithIncreasedDelay() *CorderCancelTuple

type CorderFactory

type CorderFactory interface {
	FromOrder(order *sonm.Order) *Corder
	FromParams(price *big.Int, hashrate uint64, bench Benchmarks) *Corder
	FromSlice(orders []*sonm.Order) []*Corder
}

func NewCorderFactory

func NewCorderFactory(tag string, benchmarkIndex int, counterparty common.Address) CorderFactory

type Deal

type Deal struct {
	*sonm.Deal
	// contains filtered or unexported fields
}

func (*Deal) BenchmarkValue

func (d *Deal) BenchmarkValue() uint64

func (*Deal) IsReplaceable

func (d *Deal) IsReplaceable(actualPrice *big.Int, delta float64) bool

func (*Deal) RestorePrice

func (d *Deal) RestorePrice() *big.Int

func (*Deal) Unwrap

func (d *Deal) Unwrap() *sonm.Deal

type DealFactory

type DealFactory interface {
	FromDeal(deal *sonm.Deal) *Deal
}

func NewDealFactory

func NewDealFactory(benchmarkIndex int) DealFactory

type OrdersSets

type OrdersSets struct {
	Create  []*Corder
	Restore []*Corder
	Cancel  []*Corder
}

func DivideOrdersSets

func DivideOrdersSets(existingCorders, targetCorders []*Corder) *OrdersSets

type TaskStatus

type TaskStatus struct {
	*sonm.TaskStatusReply
	ID string
}

Jump to

Keyboard shortcuts

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