terminator

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 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 {
	SourceSecretSeed     string `valid:"-" toml:"SOURCE_SECRET_SEED"`
	TradingSecretSeed    string `valid:"-" toml:"TRADING_SECRET_SEED"`
	AllowInactiveMinutes int32  `valid:"-" toml:"ALLOW_INACTIVE_MINUTES"` // bots that are inactive for more than this time will have its offers deleted
	TickIntervalSeconds  int32  `valid:"-" toml:"TICK_INTERVAL_SECONDS"`
	HorizonURL           string `valid:"-" toml:"HORIZON_URL"`

	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