Documentation ¶
Index ¶
- func InsertTestCube(c *Cube, d1 int, d2 int, A1 int, A2 int)
- func NewPgBatchOperator(parse func(stream.Object) (Dimensions, Aggregates), ...) stream.Operator
- type Aggregate
- type Aggregates
- type CountAggregate
- type Cube
- type CubeDescriber
- type Cuber
- type Dimension
- type Dimensions
- type HllAggregate
- type HllDimension
- type IntDimension
- type Partition
- type PartitionVisitor
- type PartitionedCube
- func (c *PartitionedCube) AddPartition(p Partition, upc Cuber)
- func (c *PartitionedCube) Insert(dimensions Dimensions, aggregates Aggregates)
- func (c *PartitionedCube) Merge(update *PartitionedCube)
- func (c *PartitionedCube) Visit(visitor func(Dimensions, Aggregates))
- func (c *PartitionedCube) VisitPartitions(visitor func(Partition, Cuber))
- type RepartitionableCube
- type RepartitionedCube
- type StringDimension
- type TestCubeAggregates
- type TestCubeDimensions
- type TimeDimension
- type TimeIndexedDimensions
- type TimePartition
- type TimePartitionedCube
- func (c *TimePartitionedCube) FlushItems() *TimePartitionedCube
- func (c *TimePartitionedCube) HasItems() bool
- func (c *TimePartitionedCube) Insert(dimensions Dimensions, aggregates Aggregates)
- func (c *TimePartitionedCube) NumPartitions() int
- func (c *TimePartitionedCube) PopTopPartition() (Partition, Cuber)
- type TimePartitionedCubeContainer
- type TimeRepartitionedCube
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPgBatchOperator ¶
func NewPgBatchOperator(parse func(stream.Object) (Dimensions, Aggregates), downstreamProcessed stream.ProcessedNotifier) stream.Operator
Types ¶
type Aggregates ¶
type Aggregates interface{}
type CountAggregate ¶
type CountAggregate int
func NewCountAggregate ¶
func NewCountAggregate(n int) *CountAggregate
func (*CountAggregate) Merge ¶
func (a *CountAggregate) Merge(with Aggregate)
type Cube ¶
type Cube struct { Dimensions Dimensions Aggregates Aggregates // contains filtered or unexported fields }
func NewCube ¶
func NewCube(dimensions Dimensions, aggregates Aggregates) *Cube
func NewTestCube ¶
func NewTestCube() *Cube
func (*Cube) Data ¶
func (c *Cube) Data() map[Dimensions]Aggregates
func (Cube) GetAggregates ¶
func (c Cube) GetAggregates() Aggregates
func (Cube) GetDimensions ¶
func (c Cube) GetDimensions() Dimensions
func (*Cube) Insert ¶
func (c *Cube) Insert(dimensions Dimensions, aggregates Aggregates)
func (*Cube) Visit ¶
func (c *Cube) Visit(v func(Dimensions, Aggregates))
type CubeDescriber ¶
type CubeDescriber interface { GetDimensions() Dimensions GetAggregates() Aggregates }
type Cuber ¶
type Cuber interface { Insert(dimensions Dimensions, aggregates Aggregates) Visit(func(Dimensions, Aggregates)) }
type Dimensions ¶
type Dimensions interface{}
type HllAggregate ¶
@TODO -- expand this to work with HLLs
func NewHllAggregate ¶
func NewHllAggregate(val string) *HllAggregate
func NewHllAggregateFromBytes ¶
func NewHllAggregateFromBytes(val []byte) *HllAggregate
func (*HllAggregate) Merge ¶
func (a *HllAggregate) Merge(with Aggregate)
type HllDimension ¶
func NewHllDimension ¶
func NewHllDimension(i *hll.Hll) *HllDimension
type IntDimension ¶
type IntDimension int
func NewIntDimension ¶
func NewIntDimension(i int) *IntDimension
type PartitionVisitor ¶
type PartitionedCube ¶
type PartitionedCube struct {
// contains filtered or unexported fields
}
func NewPartitionedCube ¶
func NewPartitionedCube(partitioner func(Dimensions) Partition) *PartitionedCube
func (*PartitionedCube) AddPartition ¶
func (c *PartitionedCube) AddPartition(p Partition, upc Cuber)
func (*PartitionedCube) Insert ¶
func (c *PartitionedCube) Insert(dimensions Dimensions, aggregates Aggregates)
func (*PartitionedCube) Merge ¶
func (c *PartitionedCube) Merge(update *PartitionedCube)
func (*PartitionedCube) Visit ¶
func (c *PartitionedCube) Visit(visitor func(Dimensions, Aggregates))
func (*PartitionedCube) VisitPartitions ¶
func (c *PartitionedCube) VisitPartitions(visitor func(Partition, Cuber))
type RepartitionableCube ¶
type RepartitionableCube interface { Cuber PartitionVisitor AddPartition(Partition, Cuber) }
type RepartitionedCube ¶
type RepartitionedCube struct {
// contains filtered or unexported fields
}
func NewRepartitionedCube ¶
func NewRepartitionedCube(innerpartitioner func(d Dimensions) Partition, outerpartitioner func(inner Partition) (outer Partition)) *RepartitionedCube
func (*RepartitionedCube) Add ¶
func (c *RepartitionedCube) Add(p PartitionVisitor)
func (*RepartitionedCube) Insert ¶
func (c *RepartitionedCube) Insert(dimensions Dimensions, aggregates Aggregates)
func (*RepartitionedCube) VisitPartitions ¶
func (c *RepartitionedCube) VisitPartitions(visitor func(Partition, Cuber))
type StringDimension ¶
type StringDimension string
func NewStringDimension ¶
func NewStringDimension(i string) *StringDimension
type TestCubeAggregates ¶
type TestCubeAggregates struct { A1 *CountAggregate `db:"a1"` A2 *CountAggregate `db:"a2"` }
type TestCubeDimensions ¶
type TestCubeDimensions struct { D1 IntDimension `db:"d1"` D2 IntDimension `db:"d2"` }
type TimeDimension ¶
func NewTimeDimension ¶
func NewTimeDimension(t time.Time) *TimeDimension
func (*TimeDimension) Time ¶
func (t *TimeDimension) Time() time.Time
func (*TimeDimension) Unix ¶
func (t *TimeDimension) Unix() int64
type TimeIndexedDimensions ¶
type TimePartition ¶
type TimePartition struct {
// contains filtered or unexported fields
}
func (*TimePartition) Duration ¶
func (tp *TimePartition) Duration() time.Duration
func (*TimePartition) Time ¶
func (tp *TimePartition) Time() time.Time
type TimePartitionedCube ¶
type TimePartitionedCube struct { *PartitionedCube // contains filtered or unexported fields }
func NewTimePartitionedCube ¶
func NewTimePartitionedCube(td time.Duration) *TimePartitionedCube
func (*TimePartitionedCube) FlushItems ¶
func (c *TimePartitionedCube) FlushItems() *TimePartitionedCube
func (*TimePartitionedCube) HasItems ¶
func (c *TimePartitionedCube) HasItems() bool
func (*TimePartitionedCube) Insert ¶
func (c *TimePartitionedCube) Insert(dimensions Dimensions, aggregates Aggregates)
func (*TimePartitionedCube) NumPartitions ¶
func (c *TimePartitionedCube) NumPartitions() int
func (*TimePartitionedCube) PopTopPartition ¶
func (c *TimePartitionedCube) PopTopPartition() (Partition, Cuber)
type TimePartitionedCubeContainer ¶
type TimePartitionedCubeContainer struct {
// contains filtered or unexported fields
}
func (*TimePartitionedCubeContainer) Add ¶
func (cont *TimePartitionedCubeContainer) Add(obj stream.Object)
func (*TimePartitionedCubeContainer) Flush ¶
func (cont *TimePartitionedCubeContainer) Flush(outch chan<- stream.Object) bool
func (*TimePartitionedCubeContainer) FlushAll ¶
func (cont *TimePartitionedCubeContainer) FlushAll(outch chan<- stream.Object) bool
func (*TimePartitionedCubeContainer) HasItems ¶
func (cont *TimePartitionedCubeContainer) HasItems() bool
type TimeRepartitionedCube ¶
type TimeRepartitionedCube struct { *RepartitionedCube // contains filtered or unexported fields }
func NewTimeRepartitionedCube ¶
func NewTimeRepartitionedCube(originaltd time.Duration, newtd time.Duration) *TimeRepartitionedCube
func (*TimeRepartitionedCube) HasItems ¶
func (c *TimeRepartitionedCube) HasItems() bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.