Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigProcess()
- func ConfigSetup()
- func DecodeRowKey(key string) (schema.MKey, int32, error)
- func FormatRowKey(mkey schema.MKey, partition int32) string
- func RowToSchema(row bigtable.Row, def *schema.MetricDefinition) error
- func SchemaToRow(def *schema.MetricDefinition) (string, map[string][]byte)
- type BigtableIdx
- func (b *BigtableIdx) AddOrUpdate(mkey schema.MKey, data *schema.MetricData, partition int32) (idx.Archive, int32, bool)
- func (b *BigtableIdx) Delete(orgId uint32, pattern string) ([]idx.Archive, error)
- func (b *BigtableIdx) DeleteTagged(orgId uint32, query tagquery.Query) ([]idx.Archive, error)
- func (b *BigtableIdx) Find(orgId uint32, pattern string, from int64) ([]idx.Node, error)
- func (b *BigtableIdx) Init() error
- func (b *BigtableIdx) InitBare() error
- func (b *BigtableIdx) LoadPartition(partition int32, defs []schema.MetricDefinition, now time.Time) []schema.MetricDefinition
- func (b *BigtableIdx) Prune(now time.Time) ([]idx.Archive, error)
- func (b *BigtableIdx) Stop()
- func (b *BigtableIdx) Update(point schema.MetricPoint, partition int32) (idx.Archive, int32, bool)
- type IdxConfig
Constants ¶
const COLUMN_FAMILY = "idx"
Variables ¶
var CliConfig = NewIdxConfig()
Functions ¶
func ConfigProcess ¶
func ConfigProcess()
func ConfigSetup ¶
func ConfigSetup()
func DecodeRowKey ¶
DecodeRowKey takes a rowKey string and returns the corresponding MKey and partition
func FormatRowKey ¶
FormatRowKey formats an MKey and partition into a rowKey
func RowToSchema ¶
func RowToSchema(row bigtable.Row, def *schema.MetricDefinition) error
RowToSchema takes a row and unmarshals the data into the provided MetricDefinition.
func SchemaToRow ¶
func SchemaToRow(def *schema.MetricDefinition) (string, map[string][]byte)
SchemaToRow takes a metricDefintion and returns a rowKey and column data.
Types ¶
type BigtableIdx ¶
type BigtableIdx struct { memory.MemoryIndex // contains filtered or unexported fields }
func New ¶
func New(cfg *IdxConfig) *BigtableIdx
func (*BigtableIdx) AddOrUpdate ¶
func (b *BigtableIdx) AddOrUpdate(mkey schema.MKey, data *schema.MetricData, partition int32) (idx.Archive, int32, bool)
func (*BigtableIdx) DeleteTagged ¶ added in v1.0.0
func (*BigtableIdx) Init ¶
func (b *BigtableIdx) Init() error
Init makes sure the tables and columFamilies exist. It also opens the table for reads/writes. Then rebuilds the in-memory index, sets up write queues, metrics and pruning routines
func (*BigtableIdx) InitBare ¶
func (b *BigtableIdx) InitBare() error
InitBare creates the client and makes sure the tables and columFamilies exist. It also opens the table for reads/writes.
func (*BigtableIdx) LoadPartition ¶
func (b *BigtableIdx) LoadPartition(partition int32, defs []schema.MetricDefinition, now time.Time) []schema.MetricDefinition
func (*BigtableIdx) Stop ¶
func (b *BigtableIdx) Stop()
func (*BigtableIdx) Update ¶
func (b *BigtableIdx) Update(point schema.MetricPoint, partition int32) (idx.Archive, int32, bool)
Update updates an existing archive, if found. It returns whether it was found, and - if so - the (updated) existing archive and its old partition