model2

package
v0.0.0-...-832224e Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

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