Documentation ¶
Overview ¶
Package processor provides a processor for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { WorkerCount int BatchSize int ProcessInterval time.Duration RetryAttempts int RetryDelay time.Duration ShutdownTimeout time.Duration ProcessorRefreshInterval time.Duration }
Config contains configuration options for the processor
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a default configuration for the processor
type Embedding ¶
type Embedding struct {
// contains filtered or unexported fields
}
Embedding is a processor that adds embeddings to a document
func NewEmbedding ¶
NewEmbedding creates a new embedding processor
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a processor that manages workers to process documents
type ManagerMetrics ¶
type ManagerMetrics struct {
// contains filtered or unexported fields
}
ManagerMetrics contains metrics for the manager
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor is a processor that processes documents
func NewProcessor ¶
func NewProcessor(config Config, storage storage.Storage, logger *logrus.Logger, meter metric.Meter) (*Processor, error)
NewProcessor creates a new processor with the given settings
type ProcessorMetrics ¶
type ProcessorMetrics struct {
// contains filtered or unexported fields
}
ProcessorMetrics contains metrics for the processor
type ProcessorUnit ¶
ProcessorUnit is a processor unit that processes documents
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is a registry of processors
func NewRegistry ¶
NewRegistry creates a new registry
func (*Registry) Get ¶
func (r *Registry) Get(name string) (ProcessorUnit, bool)
Get returns a processor
func (*Registry) RefreshProcessors ¶
RefreshProcessors refreshes the processors in the registry
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is a processing worker that processes documents
type WorkerMetrics ¶
type WorkerMetrics struct {
// contains filtered or unexported fields
}
WorkerMetrics contains metrics for the worker