bi

package module
v0.0.0-...-fc02298 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2016 License: BSD-2-Clause Imports: 13 Imported by: 12

README

go-easybi

A simple and easy to use Go BI package.

Documentation

Index

Constants

View Source
const (
	Daily   = "daily"
	Weekly  = "weekly"
	Monthly = "monthly"
	Yearly  = "yearly"
)
View Source
const (
	Sum = AggregateMethod(iota)
	Min
	Max
	Average
)

Variables

View Source
var (
	DataPath    = "/tmp/bi.bolt"
	FlushPeriod = time.Minute
)

Functions

func AddValue

func AddValue(aggr AggregateMethod, name string, value int)

func Flush

func Flush()

func HandleRequest

func HandleRequest(path string)

func Inc

func Inc(name string)

func MoveData

func MoveData(from, to string, aggr AggregateMethod) error

func Process

func Process()

func ReadNames

func ReadNames() ([]string, error)

Types

type AggregateMethod

type AggregateMethod int

func (AggregateMethod) String

func (a AggregateMethod) String() string

type Counter

type Counter struct {
	Sum int
	Div int
}

func (*Counter) Append

func (c *Counter) Append(aggr AggregateMethod, v int)

func (*Counter) Count

func (c *Counter) Count() int

func (*Counter) ToJSON

func (c *Counter) ToJSON() []byte

type LabeledCounter

type LabeledCounter struct {
	Counter
	Label string
}

func ReadDataOfName

func ReadDataOfName(tp, name string) ([]LabeledCounter, error)

Directories

Path Synopsis
easybi is the command line tool for handling databases generated by easybi package.
easybi is the command line tool for handling databases generated by easybi package.

Jump to

Keyboard shortcuts

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