Documentation
¶
Index ¶
- type AggNumberDataNode
- type DataNode
- type HllDataNode
- type Point
- type Shard
- type Storage
- func (s *Storage) Clean(expireTime int64)
- func (s *Storage) DeleteTimeline(key string)
- func (s *Storage) GetTimeline(key string) *Timeline
- func (s *Storage) InternalGetTimeline() map[string]*Timeline
- func (s *Storage) SetTimeline(key string, t *Timeline)
- func (s *Storage) Start()
- func (s *Storage) Stop()
- func (s *Storage) Update(f func(*Storage))
- func (s *Storage) View(f func(*Storage))
- type Timeline
- func (t *Timeline) AddRef(c int) int
- func (t *Timeline) CreateShard(ts int64) *Shard
- func (t *Timeline) GetOrCreateShard(ts int64) *Shard
- func (t *Timeline) GetShard(ts int64) *Shard
- func (t *Timeline) InternalGetShard() []*Shard
- func (t *Timeline) Lock()
- func (t *Timeline) RefCount() int
- func (t *Timeline) Unlock()
- func (t *Timeline) Update(f func(*Timeline))
- func (t *Timeline) View(f func(*Timeline))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggNumberDataNode ¶
func (*AggNumberDataNode) AddCount ¶
func (n *AggNumberDataNode) AddCount()
func (*AggNumberDataNode) MergeHll ¶
func (n *AggNumberDataNode) MergeHll(str string)
func (*AggNumberDataNode) MergeNumber ¶
func (n *AggNumberDataNode) MergeNumber(f float64)
func (*AggNumberDataNode) String ¶
func (n *AggNumberDataNode) String() string
type DataNode ¶
TODO 这里似乎将 agg 的落沉淀到底层的datanode上 这是我不太想的, 但如果不这么做, 底层就要存储 interface{}
func NewAggNumberDataNode ¶
func NewHllDataNode ¶
func NewHllDataNode() DataNode
type HllDataNode ¶
type HllDataNode struct { }
func (*HllDataNode) AddCount ¶
func (h *HllDataNode) AddCount()
func (*HllDataNode) MergeHll ¶
func (h *HllDataNode) MergeHll(str string)
func (*HllDataNode) MergeNumber ¶
func (h *HllDataNode) MergeNumber(f float64)
type Shard ¶
type Shard struct { TS int64 // 如果为true说明该shard已经冻结, 比如已经emit过, 然后又收到旧数据,可以用于发现延迟日志 Frozen bool // 有一些数据是shard粒度的, 并不需要做到 points 粒度 Data interface{} // Data2 field is for extension Data2 interface{} // contains filtered or unexported fields }
一条时间线在某一个时间点的所有值的集合
func (*Shard) InternalGetAllPoints ¶
func (*Shard) PointCount ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
存储
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) DeleteTimeline ¶
func (*Storage) GetTimeline ¶
func (*Storage) InternalGetTimeline ¶
func (*Storage) SetTimeline ¶
type Timeline ¶
type Timeline struct { // 时间线的key或者name Key string // contains filtered or unexported fields }
func NewTimeline ¶
func (*Timeline) CreateShard ¶
func (*Timeline) GetOrCreateShard ¶
func (*Timeline) InternalGetShard ¶
Click to show internal directories.
Click to hide internal directories.