model2

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 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

func GetLogPrefix

func GetLogPrefix(botName string, strategy string) string

GetLogPrefix from botName

func GetPrefix

func GetPrefix(botName string) string

GetPrefix returns the general prefix for filenames associated with a botName

Types

type Bot

type Bot struct {
	Name     string `json:"name"`
	Strategy string `json:"strategy"`
	Running  bool   `json:"running"`
	Test     bool   `json:"test"`
	Warnings uint16 `json:"warnings"`
	Errors   uint16 `json:"errors"`
}

Bot represents a kelp bot instance

func FromFilenames

func FromFilenames(traderFilename string, strategyFilename string) *Bot

FromFilenames creates a Bot representing the bot that uses the provided filenames

func MakeAutogeneratedBot

func MakeAutogeneratedBot() *Bot

MakeAutogeneratedBot factory method

func (*Bot) Filenames

func (b *Bot) Filenames() *FilenamePair

Filenames where we should save bot config file

type FilenamePair

type FilenamePair struct {
	Trader   string
	Strategy string
}

FilenamePair represents the two config filenames associated with a bot

func GetBotFilenames

func GetBotFilenames(botName string, strategy string) *FilenamePair

GetBotFilenames from botName

Jump to

Keyboard shortcuts

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