terminator

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 10 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 {
	SOURCE_SECRET_SEED     string `valid:"-"`
	TRADING_SECRET_SEED    string `valid:"-"`
	ALLOW_INACTIVE_MINUTES int32  `valid:"-"` // bots that are inactive for more than this time will have its offers deleted
	TICK_INTERVAL_SECONDS  int32  `valid:"-"`
	HORIZON_URL            string `valid:"-"`

	TradingAccount *string
	SourceAccount  *string // can be nil
}

Config represents the configuration params for the bot

func (*Config) Init

func (c *Config) Init() error

Init initializes this config

func (Config) String

func (c Config) String() string

String impl.

type Terminator

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

Terminator contains the logic to terminate offers

func MakeTerminator

func MakeTerminator(
	api *horizon.Client,
	sdex *plugins.SDEX,
	tradingAccount string,
	tickIntervalSeconds int32,
	allowInactiveMinutes int32,
) *Terminator

MakeTerminator is a factory method to make a Terminator

func (*Terminator) StartService

func (t *Terminator) StartService()

StartService starts the Terminator service

Jump to

Keyboard shortcuts

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