go-easybi: github.com/daviddengcn/go-easybi Index | Files | Directories

package bi

import "github.com/daviddengcn/go-easybi"

Index

Package Files

bi.go counter.go index_html.go web.go

Constants

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

Variables

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

func AddValue Uses

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

func Flush Uses

func Flush()

func HandleRequest Uses

func HandleRequest(path string)

func Inc Uses

func Inc(name string)

func MoveData Uses

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

func Process Uses

func Process()

func ReadDataOfName Uses

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

func ReadNames Uses

func ReadNames() ([]string, error)

type AggregateMethod Uses

type AggregateMethod int

func (AggregateMethod) String Uses

func (a AggregateMethod) String() string

type Counter Uses

type Counter struct {
    Sum int
    Div int
}

func (*Counter) Append Uses

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

func (*Counter) Count Uses

func (c *Counter) Count() int

func (*Counter) ToJSON Uses

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

type LabeledCounter Uses

type LabeledCounter struct {
    Counter
    Label string
}

Directories

PathSynopsis
bieasybi is the command line tool for handling databases generated by easybi package.
demo

Package bi imports 13 packages (graph) and is imported by 7 packages. Updated 2016-07-17. Refresh now. Tools for package owners.