trend_prediction

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWindowLength       = 3
	DefaultWindowEscapeLength = 60
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertFunc

type AlertFunc func(...interface{})

type AlertSubscribe

type AlertSubscribe struct {
	AlertFunc AlertFunc
	// contains filtered or unexported fields
}

func (*AlertSubscribe) Inhibition

func (s *AlertSubscribe) Inhibition()

func (*AlertSubscribe) Recover

func (s *AlertSubscribe) Recover()

func (*AlertSubscribe) Silence

func (s *AlertSubscribe) Silence()

type DataSource

type DataSource struct {
	Source  chan interface{}
	KeyName string
}

type Option

type Option func(o *option)

func WithCheckAverage

func WithCheckAverage(target int) Option

func WithCheckDescending

func WithCheckDescending() Option

func WithCheckIncreasing

func WithCheckIncreasing() Option

func WithOnlyUseEscape

func WithOnlyUseEscape() Option

func WithOnlyUseLength

func WithOnlyUseLength() Option

func WithThreshold

func WithThreshold(threshold int) Option

func WithWindowLength

func WithWindowLength(length int) Option

func WithWindowTimeEscape

func WithWindowTimeEscape(escape int) Option

type TrendPrediction

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

func NewTrendPrediction

func NewTrendPrediction(source *DataSource, opts ...Option) *TrendPrediction

func (*TrendPrediction) RegisterSubscribe

func (t *TrendPrediction) RegisterSubscribe(sub *AlertSubscribe)

func (*TrendPrediction) Watching

func (t *TrendPrediction) Watching()

Jump to

Keyboard shortcuts

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