executor

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 NewAggregator

func NewAggregator() *Aggregator

NewAggregator 创建结果聚合器

func (*Aggregator) AddResult

func (a *Aggregator) AddResult(result *domain.QueryResult)

AddResult 添加结果

func (*Aggregator) Aggregate

func (a *Aggregator) Aggregate() (*domain.QueryResult, error)

Aggregate 聚合所有结果

func (*Aggregator) Clear

func (a *Aggregator) Clear()

Clear 清空聚合器

func (*Aggregator) Count

func (a *Aggregator) Count() int

Count 返回结果数量

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 NewRuntime

func NewRuntime() *Runtime

NewRuntime 创建执行运行时

func (*Runtime) CancelQuery

func (r *Runtime) CancelQuery(queryID string) error

CancelQuery 取消查询

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

func (r *Runtime) UnregisterQuery(queryID string)

UnregisterQuery 注销查询

func (*Runtime) UpdateProgress

func (r *Runtime) UpdateProgress(queryID string, progress float64, status string)

UpdateProgress 更新查询进度

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL