aggregations

package
v3.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2016 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseCleanup

func DatabaseCleanup()

func Init

func Init(listen, location, ttlString *string, errorChannel chan error) error

func ReadOAuthToken

func ReadOAuthToken(key string, dest interface{}) error

func WriteOAuthToken

func WriteOAuthToken(key string, token interface{}) error

Types

type Counter

type Counter struct {
	Name string
}

func GetCounter

func GetCounter(name string) (*Counter, bool, error)

func (*Counter) GetValue

func (c *Counter) GetValue() int64

func (*Counter) Increment

func (c *Counter) Increment(delta int64)

func (*Counter) SetValue

func (c *Counter) SetValue(newValue int64)

type FunctionType

type FunctionType int
const (
	None FunctionType = iota
	Sum
	Avg
	Min
	Max
	Count
	StdDev
)

type Manager

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

func (*Manager) Debugf

func (m *Manager) Debugf(format string, v ...interface{})

Debugf sends a formatted string to the agent's debug log, if it exists. It works like log.Logf

func (*Manager) Errorf

func (m *Manager) Errorf(format string, v ...interface{})

func (*Manager) Logf

func (m *Manager) Logf(format string, v ...interface{})

Logf sends a formatted string to the agent's global log. It works like log.Logf

type Series

type Series struct {
	Name string
}

func GetSeries

func GetSeries(name string) (*Series, bool, error)

func (*Series) Aggregate

func (s *Series) Aggregate(functionType FunctionType, aggregateInterval int, aggregateCount int, endTimePtr *time.Time) (interface{}, error)

func (*Series) Compute

func (s *Series) Compute(functionType FunctionType, start, end *time.Time) (float64, error)

func (*Series) Items

func (s *Series) Items(count int) (interface{}, error)

func (*Series) Last

func (s *Series) Last() (map[string]interface{}, error)

func (*Series) Pop

func (s *Series) Pop() (map[string]interface{}, error)

func (*Series) Push

func (s *Series) Push(timestamp *time.Time, value float64) error

func (*Series) TrimCount

func (s *Series) TrimCount(count int) error

func (*Series) TrimSince

func (s *Series) TrimSince(since time.Time) error

Jump to

Keyboard shortcuts

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