statistics

package
v0.0.0-...-a82784a Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// errors
	ErrUnknown = errors.New("unkown kind id")
)

Functions

func ApplyTriggers

func ApplyTriggers(channel, user, text string)

func Flush

func Flush(ctx context.Context) error

func Init

func Init() (err error)

func NewKind

func NewKind(ctx context.Context, name, trigger string, isRegexp bool) error

func PlotRouter

func PlotRouter() (*chi.Mux, error)

func Prometheus

func Prometheus(ctx context.Context) (string, error)

func Send

func Send(value, kind int64) error

func Stop

func Stop()

Types

type ChartData

type ChartData struct {
	Current  int64
	Previous int64
}

type TemplateData

type TemplateData struct {
	Version string
	Title   string
	Data    map[time.Time]*ChartData
}

type TextTrigger

type TextTrigger struct {
	Trigger  string
	IsRegexp bool
}

Jump to

Keyboard shortcuts

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