Documentation
¶
Index ¶
- Constants
- func ParseFileCallback(fileName string, delimiter rune, cb ParserCallback) error
- func ParseStreamCallback(reader io.Reader, delimiter rune, cb ParserCallback) error
- type Accumulator
- type Filter
- type GroupingInterval
- type GroupingType
- type Merki
- func (m *Merki) AddRecord(w io.Writer, record *Record) error
- func (m *Merki) DrawGraph(r io.Reader, measure string) (string, error)
- func (m *Merki) DrawSparkLine(r io.Reader, measure string) (string, error)
- func (m *Merki) Filter(r io.Reader, measure string, gi GroupingInterval, gt GroupingType) error
- func (m *Merki) Interval(r io.Reader, measure string, round RoundType) error
- func (m *Merki) Latest(r io.Reader) error
- func (m *Merki) Measurements(r io.Reader) error
- type Parser
- type ParserCallback
- type Record
- type RoundType
Constants ¶
View Source
const ( IntervalNone GroupingInterval = iota IntervalHourly IntervalDaily IntervalWeekly IntervalTotal TypeFirst GroupingType = iota TypeAverage TypeMax TypeMin TypeSum RoundSeconds RoundType = iota RoundMinutes RoundHours RoundDays )
Variables ¶
This section is empty.
Functions ¶
func ParseFileCallback ¶ added in v0.0.9
func ParseFileCallback(fileName string, delimiter rune, cb ParserCallback) error
func ParseStreamCallback ¶ added in v0.0.9
func ParseStreamCallback(reader io.Reader, delimiter rune, cb ParserCallback) error
Types ¶
type Accumulator ¶
Accumulator collects records by string key
func (*Accumulator) Add ¶
func (a *Accumulator) Add(key string, r *Record)
Add adds record to the accumulator
func (*Accumulator) Print ¶
func (a *Accumulator) Print(w *csv.Writer, gt GroupingType) error
Print accumulator to the writer
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func NewFilter ¶
func NewFilter(w *csv.Writer, measure string, gi GroupingInterval, gt GroupingType) *Filter
type GroupingInterval ¶
type GroupingInterval int
type GroupingType ¶
type GroupingType int
type Merki ¶
type Merki struct {
// contains filtered or unexported fields
}
func (*Merki) DrawSparkLine ¶ added in v0.0.9
func (*Merki) Filter ¶
func (m *Merki) Filter(r io.Reader, measure string, gi GroupingInterval, gt GroupingType) error
type Parser ¶
type Parser struct { Record chan *Record Error chan error Done chan bool // contains filtered or unexported fields }
func (*Parser) ParseStream ¶
Click to show internal directories.
Click to hide internal directories.