alerts

package
v0.0.0-...-629b520 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	// contains filtered or unexported fields
}

Alert describes a simple symbol trade price alert.

func New

func New(symbol string, limit float64) *Alert

New creates new alert.

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger logs alerts that are triggered by observed trades.

func NewLogger

func NewLogger(watcher tradesWatcher, logger logger) *Logger

NewLogger returns a new logger instance.

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, alerts ...*Alert) error

Log logs alert using logger when it's triggered.

Jump to

Keyboard shortcuts

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