Documentation
¶
Index ¶
- type Aggregator
- type BaseExecutor
- type Executor
- type QueryContext
- type Runtime
- func (r *Runtime) CancelQuery(queryID string) error
- func (r *Runtime) GetAllQueries() []*QueryContext
- func (r *Runtime) GetQueryStatus(queryID string) (*QueryContext, error)
- func (r *Runtime) RegisterQuery(queryID string, cancelFunc context.CancelFunc)
- func (r *Runtime) UnregisterQuery(queryID string)
- func (r *Runtime) UpdateProgress(queryID string, progress float64, status string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator 结果聚合器
func (*Aggregator) AddResult ¶
func (a *Aggregator) AddResult(result *domain.QueryResult)
AddResult 添加结果
func (*Aggregator) Aggregate ¶
func (a *Aggregator) Aggregate() (*domain.QueryResult, error)
Aggregate 聚合所有结果
type BaseExecutor ¶
type BaseExecutor struct {
// contains filtered or unexported fields
}
BaseExecutor 基础执行器
func (*BaseExecutor) Execute ¶
func (e *BaseExecutor) Execute(ctx context.Context, plan *plan.Plan) (*domain.QueryResult, error)
Execute 执行计划
type Executor ¶
type Executor interface {
// Execute 执行计划
Execute(ctx context.Context, plan *plan.Plan) (*domain.QueryResult, error)
}
Executor 执行器接口
func NewExecutor ¶
func NewExecutor(dataAccessService dataaccess.Service) Executor
NewExecutor 创建执行器
func NewExecutorWithIndexManager ¶
func NewExecutorWithIndexManager(dataAccessService dataaccess.Service, indexManager *memory.IndexManager) Executor
NewExecutorWithIndexManager 创建带索引管理器的执行器
type QueryContext ¶
type QueryContext struct {
QueryID string
StartTime time.Time
CancelFunc context.CancelFunc
Status string
Progress float64
}
QueryContext 查询上下文
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime 执行运行时
func (*Runtime) GetAllQueries ¶
func (r *Runtime) GetAllQueries() []*QueryContext
GetAllQueries 获取所有活跃查询
func (*Runtime) GetQueryStatus ¶
func (r *Runtime) GetQueryStatus(queryID string) (*QueryContext, error)
GetQueryStatus 获取查询状态
func (*Runtime) RegisterQuery ¶
func (r *Runtime) RegisterQuery(queryID string, cancelFunc context.CancelFunc)
RegisterQuery 注册查询
func (*Runtime) UnregisterQuery ¶
UnregisterQuery 注销查询
Click to show internal directories.
Click to hide internal directories.