terminator

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 12 Imported by: 8 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 *horizonclient.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