Documentation ¶
Index ¶
- Variables
- func MakeRedis(settings interface{}) (services.Meter, error)
- func MakeRedisShards(settings interface{}) (services.Meter, error)
- type ByNameAndWindow
- type Redis
- func (r *Redis) Add(id string, name string, data map[string]string, tw services.TimeWindow, ...) error
- func (r *Redis) AddMax(id string, name string, uid string, data map[string]string, ...) error
- func (r *Redis) AddOnce(id string, name string, uid string, data map[string]string, ...) error
- func (r *Redis) Get(id string, name string, data map[string]string, tw services.TimeWindow) (*services.Metric, error)
- func (r *Redis) GetByTimeIds(id string, from, to int64, tId, maxTId int64, name, twType string) ([]*services.Metric, error)
- func (r *Redis) N(id string, to, n int64, name, twType string) ([]*services.Metric, error)
- func (r *Redis) Range(id string, from, to int64, name, twType string) ([]*services.Metric, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Meters = services.MeterDefinitions{ "redis": services.MeterDefinition{ Name: "Redis Meter Database", Description: "For Production Use", Maker: MakeRedis, SettingsValidator: databases.ValidateRedisSettings, }, "redis-shard": services.MeterDefinition{ Name: "Redis Sharded Meter Database", Description: "For Production Use", Maker: MakeRedisShards, SettingsValidator: databases.ValidateRedisShardSettings, }, }
Functions ¶
func MakeRedisShards ¶ added in v0.0.4
Types ¶
type ByNameAndWindow ¶
func (ByNameAndWindow) Len ¶
func (b ByNameAndWindow) Len() int
func (ByNameAndWindow) Less ¶
func (b ByNameAndWindow) Less(i, j int) bool
func (ByNameAndWindow) Swap ¶
func (b ByNameAndWindow) Swap(i, j int)
type Redis ¶
func (*Redis) AddMax ¶
func (r *Redis) AddMax(id string, name string, uid string, data map[string]string, tw services.TimeWindow, value int64) error
Adds the maximum value from a given UID to a given statistic
func (*Redis) AddOnce ¶
func (r *Redis) AddOnce(id string, name string, uid string, data map[string]string, tw services.TimeWindow, value int64) error
Adds a value from a UID to the statistic, but only once
func (*Redis) GetByTimeIds ¶
Click to show internal directories.
Click to hide internal directories.