handlers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVGenerator

type CSVGenerator struct {
	// contains filtered or unexported fields
}

func (*CSVGenerator) GetEstimatedSize

func (g *CSVGenerator) GetEstimatedSize() int

type DataProcessingParams

type DataProcessingParams struct {
	Pipeline   string                 `json:"pipeline"` // classification, regression, clustering, anomaly, transformation
	DataSource DataSource             `json:"data_source"`
	Output     OutputConfig           `json:"output"`
	Options    map[string]interface{} `json:"options,omitempty"`
}

type DataProcessorHandler

type DataProcessorHandler struct {
	// contains filtered or unexported fields
}

DataProcessorHandler implements async data processing with ML pipeline simulation

func NewDataProcessorHandler

func NewDataProcessorHandler() *DataProcessorHandler

NewDataProcessorHandler creates a new data processor handler

func (*DataProcessorHandler) EstimatedDuration

func (h *DataProcessorHandler) EstimatedDuration() time.Duration

EstimatedDuration returns the expected processing time

func (*DataProcessorHandler) Process

Process should not be called for async handlers

func (*DataProcessorHandler) ProcessWithProgress

func (h *DataProcessorHandler) ProcessWithProgress(
	ctx context.Context,
	req *streamer.Request,
	reporter streamer.ProgressReporter,
) (*streamer.Result, error)

ProcessWithProgress implements the ML pipeline processing with detailed progress

func (*DataProcessorHandler) Validate

func (h *DataProcessorHandler) Validate(req *streamer.Request) error

Validate validates the data processing request

type DataSource

type DataSource struct {
	Type     string                 `json:"type"` // file, query, stream
	Path     string                 `json:"path,omitempty"`
	Query    string                 `json:"query,omitempty"`
	StreamID string                 `json:"stream_id,omitempty"`
	Config   map[string]interface{} `json:"config,omitempty"`
}

type DataStats

type DataStats struct {
	StartTime    time.Time
	TotalRecords int
	Columns      []string
	DataTypes    map[string]string
}

type EchoAsyncHandler

type EchoAsyncHandler struct{}

EchoAsyncHandler is a simple test handler that echoes the input with progress updates

func NewEchoAsyncHandler

func NewEchoAsyncHandler() *EchoAsyncHandler

NewEchoAsyncHandler creates a new echo async handler

func (*EchoAsyncHandler) EstimatedDuration

func (h *EchoAsyncHandler) EstimatedDuration() time.Duration

EstimatedDuration returns the expected processing time

func (*EchoAsyncHandler) Process

Process should not be called for async handlers

func (*EchoAsyncHandler) ProcessWithProgress

func (h *EchoAsyncHandler) ProcessWithProgress(
	ctx context.Context,
	req *streamer.Request,
	reporter streamer.ProgressReporter,
) (*streamer.Result, error)

ProcessWithProgress echoes the input with simulated progress

func (*EchoAsyncHandler) Validate

func (h *EchoAsyncHandler) Validate(req *streamer.Request) error

Validate validates the echo request

type ExcelGenerator

type ExcelGenerator struct {
	// contains filtered or unexported fields
}

func (*ExcelGenerator) GetEstimatedSize

func (g *ExcelGenerator) GetEstimatedSize() int

type FeatureInfo

type FeatureInfo struct {
	Type       string // numeric, categorical, text
	Importance float64
}

type FeatureSet

type FeatureSet struct {
	RecordCount   int
	Features      map[string]FeatureInfo
	SelectedCount int
}

type ModelResults

type ModelResults struct {
	ModelVersion     string
	Pipeline         string
	StartTime        time.Time
	ProcessingTime   time.Duration
	RecordsProcessed int
	Predictions      []interface{}
	Metrics          map[string]float64
	OutputID         string
}

type OutputConfig

type OutputConfig struct {
	Format      string                 `json:"format"` // json, csv, parquet
	Destination string                 `json:"destination,omitempty"`
	Options     map[string]interface{} `json:"options,omitempty"`
}

type PDFGenerator

type PDFGenerator struct {
	// contains filtered or unexported fields
}

func (*PDFGenerator) GetEstimatedSize

func (g *PDFGenerator) GetEstimatedSize() int

type PreprocessedData

type PreprocessedData struct {
	OriginalRecords   int
	CleanedRecords    int
	RemovedDuplicates int
	RemovedInvalid    int
	NormalizedColumns []string
	ImputedValues     map[string]int
	StartTime         time.Time
	ProcessingTime    time.Duration
}

type ProcessedData

type ProcessedData struct {
	RecordCount int
	Stats       map[string]interface{}
	Categories  map[string]int
}

type ProcessingStats

type ProcessingStats struct {
	StartTime          time.Time
	EndTime            time.Time
	ProcessingDuration time.Duration
	TotalRecords       int
	ProcessedCount     int
	Categories         map[string]int
}

type QueryResult

type QueryResult struct {
	TotalRecords int
	Sources      int
	QueryTime    time.Duration
}

type ReportAsyncHandler

type ReportAsyncHandler struct {
	// contains filtered or unexported fields
}

ReportAsyncHandler implements async report generation with progress tracking

func NewReportAsyncHandler

func NewReportAsyncHandler() *ReportAsyncHandler

NewReportAsyncHandler creates a new async report handler

func (*ReportAsyncHandler) EstimatedDuration

func (h *ReportAsyncHandler) EstimatedDuration() time.Duration

EstimatedDuration returns the expected processing time

func (*ReportAsyncHandler) Process

Process should not be called for async handlers

func (*ReportAsyncHandler) ProcessWithProgress

func (h *ReportAsyncHandler) ProcessWithProgress(
	ctx context.Context,
	req *streamer.Request,
	reporter streamer.ProgressReporter,
) (*streamer.Result, error)

ProcessWithProgress implements the actual report generation with progress updates

func (*ReportAsyncHandler) Validate

func (h *ReportAsyncHandler) Validate(req *streamer.Request) error

Validate validates the report generation request

type ReportGenerator

type ReportGenerator interface {
	GetEstimatedSize() int
}

Report generators (interfaces for different formats)

type ReportInfo

type ReportInfo struct {
	ID        string
	Format    string
	SizeBytes int
	CreatedAt time.Time
}

type ReportParams

type ReportParams struct {
	StartDate     string                 `json:"start_date"`
	EndDate       string                 `json:"end_date"`
	Format        string                 `json:"format"`      // pdf, csv, excel
	ReportType    string                 `json:"report_type"` // monthly, quarterly, annual, custom
	IncludeCharts bool                   `json:"include_charts"`
	Filters       map[string]interface{} `json:"filters,omitempty"`
}

Jump to

Keyboard shortcuts

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