Documentation
¶
Index ¶
- Variables
- type DBIndex
- type IndexEntry
- type JSONIndex
- func (J *JSONIndex) Batch(add []*IndexEntry, rm []*IndexEntry) Promise[int32]
- func (J *JSONIndex) EndMerge(plan *MergePlan) error
- func (J *JSONIndex) Get(_path string) *IndexEntry
- func (J *JSONIndex) GetDropQueue() []string
- func (J *JSONIndex) GetMergePlan(layer string, database string, table string, iteration int) (*MergePlan, error)
- func (J *JSONIndex) GetMergePlanner() MergePlanner
- func (J *JSONIndex) GetQuerier() Querier
- func (J *JSONIndex) Query(options QueryOptions) ([]*IndexEntry, error)
- func (J *JSONIndex) RmFromDropQueue(files []string) Promise[int32]
- func (J *JSONIndex) Run()
- func (J *JSONIndex) Stop()
- type MergeConfigurationsConf
- type MergePlan
- type MergePlanner
- type Promise
- type QEntry
- type Querier
- type QueryOptions
- type RedisIndex
- func (r *RedisIndex) AddToDropQueue(files []string) Promise[int32]
- func (r *RedisIndex) Batch(add []*IndexEntry, rm []*IndexEntry) Promise[int32]
- func (r *RedisIndex) EndMerge(plan *MergePlan) error
- func (r *RedisIndex) Get(path string) *IndexEntry
- func (r *RedisIndex) GetDropQueue() []string
- func (r *RedisIndex) GetMergePlan(layer string, database string, table string, iteration int) (*MergePlan, error)
- func (r *RedisIndex) GetMergePlanner() MergePlanner
- func (r *RedisIndex) GetQuerier() Querier
- func (r *RedisIndex) Query(options QueryOptions) ([]*IndexEntry, error)
- func (r *RedisIndex) RmFromDropQueue(files []string) Promise[int32]
- func (r *RedisIndex) Run()
- func (r *RedisIndex) Stop()
- type SinglePromise
- type TableIndex
- type WaitForAllPromise
Constants ¶
This section is empty.
Variables ¶
View Source
var END_MERGE_SCRIPT []byte
View Source
var GET_MERGE_PLAN_SCRIPT []byte
View Source
var SCRIPT_PATCH_INDEX []byte
Functions ¶
This section is empty.
Types ¶
type DBIndex ¶
type DBIndex interface {
Databases() ([]string, error)
Tables(database string) ([]string, error)
Paths(database string, table string) ([]string, error)
}
func NewRedisDbIndex ¶
type IndexEntry ¶
type IndexEntry struct {
Layer string `json:"layer"`
Database string `json:"database"`
Table string `json:"table"`
Path string `json:"path"`
SizeBytes int64 `json:"size_bytes"`
RowCount int64 `json:"row_count"`
ChunkTime int64 `json:"chunk_time"`
Min map[string]any `json:"min"`
Max map[string]any `json:"max"`
MinTime int64 `json:"min_time"`
MaxTime int64 `json:"max_time"`
}
type JSONIndex ¶
type JSONIndex struct {
// contains filtered or unexported fields
}
func (*JSONIndex) Batch ¶
func (J *JSONIndex) Batch(add []*IndexEntry, rm []*IndexEntry) Promise[int32]
func (*JSONIndex) Get ¶
func (J *JSONIndex) Get(_path string) *IndexEntry
func (*JSONIndex) GetDropQueue ¶
func (*JSONIndex) GetMergePlan ¶
func (*JSONIndex) GetMergePlanner ¶
func (J *JSONIndex) GetMergePlanner() MergePlanner
func (*JSONIndex) GetQuerier ¶
func (*JSONIndex) Query ¶
func (J *JSONIndex) Query(options QueryOptions) ([]*IndexEntry, error)
func (*JSONIndex) RmFromDropQueue ¶
type MergeConfigurationsConf ¶
type MergeConfigurationsConf [][3]int64
MergeConfiguration is array of arrays of: [[timeout_sec, max_size, merge_iteration_id], ...] You have to init MergeConfigurations in the very beginning
var MergeConfigurations MergeConfigurationsConf
type MergePlanner ¶
type Querier ¶
type Querier interface {
Query(options QueryOptions) ([]*IndexEntry, error)
}
type QueryOptions ¶
type RedisIndex ¶
type RedisIndex struct {
// contains filtered or unexported fields
}
func (*RedisIndex) AddToDropQueue ¶
func (r *RedisIndex) AddToDropQueue(files []string) Promise[int32]
func (*RedisIndex) Batch ¶
func (r *RedisIndex) Batch(add []*IndexEntry, rm []*IndexEntry) Promise[int32]
func (*RedisIndex) EndMerge ¶
func (r *RedisIndex) EndMerge(plan *MergePlan) error
func (*RedisIndex) Get ¶
func (r *RedisIndex) Get(path string) *IndexEntry
func (*RedisIndex) GetDropQueue ¶
func (r *RedisIndex) GetDropQueue() []string
func (*RedisIndex) GetMergePlan ¶
func (*RedisIndex) GetMergePlanner ¶
func (r *RedisIndex) GetMergePlanner() MergePlanner
func (*RedisIndex) GetQuerier ¶
func (r *RedisIndex) GetQuerier() Querier
func (*RedisIndex) Query ¶
func (r *RedisIndex) Query(options QueryOptions) ([]*IndexEntry, error)
func (*RedisIndex) RmFromDropQueue ¶
func (r *RedisIndex) RmFromDropQueue(files []string) Promise[int32]
func (*RedisIndex) Run ¶
func (r *RedisIndex) Run()
func (*RedisIndex) Stop ¶
func (r *RedisIndex) Stop()
type SinglePromise ¶
type SinglePromise[T any] struct { // contains filtered or unexported fields }
func (*SinglePromise[T]) Done ¶
func (p *SinglePromise[T]) Done(res T, err error)
func (*SinglePromise[T]) Get ¶
func (p *SinglePromise[T]) Get() (T, error)
func (*SinglePromise[T]) Peek ¶
func (p *SinglePromise[T]) Peek() (int32, T, error)
type TableIndex ¶
type TableIndex interface {
Batch(add []*IndexEntry, rm []*IndexEntry) Promise[int32]
Get(path string) *IndexEntry
Run()
Stop()
RmFromDropQueue(files []string) Promise[int32]
GetDropQueue() []string
GetMergePlanner() MergePlanner
GetQuerier() Querier
}
func NewJSONIndex ¶
func NewJSONIndex(root string, database string, table string) TableIndex
func NewRedisIndex ¶
func NewRedisIndex(URL string) (TableIndex, error)
type WaitForAllPromise ¶
type WaitForAllPromise[T any] struct { // contains filtered or unexported fields }
func (*WaitForAllPromise[T]) Add ¶
func (p *WaitForAllPromise[T]) Add(promise Promise[T])
func (*WaitForAllPromise[T]) Done ¶
func (p *WaitForAllPromise[T]) Done(res T, err error)
func (*WaitForAllPromise[T]) Get ¶
func (p *WaitForAllPromise[T]) Get() (T, error)
func (*WaitForAllPromise[T]) Peek ¶
func (p *WaitForAllPromise[T]) Peek() (int32, T, error)
Click to show internal directories.
Click to hide internal directories.