Documentation ¶
Index ¶
- Constants
- Variables
- func Ethers(value int64) *big.Int
- func GetAddressFromPublicKey(pk []byte) common.Address
- func GetMarketsChannelID(channel string) string
- func GetOHLCVChannelID(bt, qt common.Address, unit string, duration int64) string
- func GetOrderBookChannelID(bt, qt common.Address) string
- func GetPairKey(bt, qt common.Address) string
- func GetPriceBoardChannelID(bt, qt common.Address) string
- func GetTickChannelID(bt, qt common.Address, unit string, duration int64) string
- func GetTradeChannelID(bt, qt common.Address) string
- func JSON(x interface{}) string
- func NewColoredLogger() *logging.Logger
- func NewErrorLogger() *logging.Logger
- func NewFileLogger(module string, logFile string) *logging.Logger
- func NewLogger(module string, logFile string) *logging.Logger
- func NewNoopLogger() *logging.Logger
- func NewStandardOutputLogger() *logging.Logger
- func PrintError(msg string, err error)
- func PrintJSON(x interface{})
- func Retry(retries int, fn func() error) error
- func ToDecimal(value *big.Int) float64
- func UintToPaddedString(num int64) string
- func Use(...interface{})
Constants ¶
View Source
const (
LogPrefix = "tomochain"
)
TODO: add log prefix to params
Variables ¶
View Source
var Logger = NewLogger("main", "./logs/main.log")
View Source
var StdoutLogger = NewStandardOutputLogger()
View Source
var TerminalLogger = NewColoredLogger()
Functions ¶
func GetAddressFromPublicKey ¶
GetAddressFromPublicKey get derived address from public key
func GetMarketsChannelID ¶
func GetOHLCVChannelID ¶
func GetOrderBookChannelID ¶
func GetPairKey ¶
GetPairKey return the pair key identifier corresponding to two
func GetPriceBoardChannelID ¶
func GetTickChannelID ¶
GetTickChannelID is used to get the channel id for OHLCV data streaming it takes pairname, duration and units of data streaming
func GetTradeChannelID ¶
func NewColoredLogger ¶
func NewColoredLogger() *logging.Logger
func NewErrorLogger ¶
func NewErrorLogger() *logging.Logger
func NewFileLogger ¶
NewFileLogger creates a logging utility that outputs to the file passed as argument but but does not output to stdout.
func NewLogger ¶
NewFileLogger creates a logging utility that outputs to the file passed as argument and also output to stdout.
func NewNoopLogger ¶
func NewNoopLogger() *logging.Logger
func NewStandardOutputLogger ¶
func NewStandardOutputLogger() *logging.Logger
NewFileLogger creates a logging utility that only output to stdout.
func PrintError ¶
func UintToPaddedString ¶
UintToPaddedString converts an int to string of length 19 by padding with 0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.