matcher

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Key        *ecdsa.PrivateKey
	PollDelay  time.Duration
	DWH        sonm.DWHClient
	Eth        blockchain.API
	QueryLimit uint64
	Log        *zap.SugaredLogger
}

type Matcher

type Matcher interface {
	CreateDealByOrder(ctx context.Context, order *sonm.Order) (*sonm.Deal, error)
}

func NewDisabledMatcher

func NewDisabledMatcher() Matcher

NewDisabledMatcher return `Matcher` interface implementation that does nothing.

func NewMatcher

func NewMatcher(cfg *Config) (Matcher, error)

type YAMLConfig

type YAMLConfig struct {
	PollDelay  time.Duration `yaml:"poll_delay" default:"30s"`
	QueryLimit uint64        `yaml:"query_limit" default:"50"`
}

YAMLConfig is embeddable config that can be integrated with another component's config.

Jump to

Keyboard shortcuts

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