Documentation
¶
Index ¶
- Variables
- type Algorithm
- type AlgorithmDependency
- type AlgorithmExecutionPath
- type AlgorithmState
- type Annotation
- type AnnotationAlgorithm
- type AnnotationWindowType
- type CircularDependencyError
- type CreateAlgorithmDependencyParams
- type CreateAlgorithmParams
- type CreateMetadataFieldParams
- type CreateProcessorParams
- type CreateResultParams
- type CreateWindowTypeMetadataFieldBridgeParams
- type CreateWindowTypeParams
- type DBTX
- type Datalayer
- func (d *Datalayer) EmitWindow(ctx context.Context, window *pb.Window, useTls bool) (_ pb.WindowEmitStatus, retErr error)
- func (d *Datalayer) Expose(ctx context.Context, settings *pb.ExposeSettings) (_ *pb.InternalState, retErr error)
- func (d *Datalayer) RegisterProcessor(ctx context.Context, proc *pb.ProcessorRegistration) (retErr error)
- type FinaliseResultParams
- type Metadata
- type MetadataField
- type MetadataFieldsReference
- type MetadataFilter
- type NullAlgorithmState
- type NullResultType
- type NullWindowState
- type PgTx
- type Processor
- type Queries
- func (q *Queries) CreateAlgorithm(ctx context.Context, arg CreateAlgorithmParams) error
- func (q *Queries) CreateAlgorithmDependency(ctx context.Context, arg CreateAlgorithmDependencyParams) error
- func (q *Queries) CreateMetadataField(ctx context.Context, arg CreateMetadataFieldParams) (int64, error)
- func (q *Queries) CreateProcessor(ctx context.Context, arg CreateProcessorParams) error
- func (q *Queries) CreateResult(ctx context.Context, arg CreateResultParams) (int64, error)
- func (q *Queries) CreateWindowType(ctx context.Context, arg CreateWindowTypeParams) (int64, error)
- func (q *Queries) CreateWindowTypeMetadataFieldBridge(ctx context.Context, arg CreateWindowTypeMetadataFieldBridgeParams) error
- func (q *Queries) FinaliseResult(ctx context.Context, arg FinaliseResultParams) error
- func (q *Queries) ReadAlgorithmExecutionPaths(ctx context.Context, windowTypeID string) ([]AlgorithmExecutionPath, error)
- func (q *Queries) ReadAlgorithmExecutionPathsForAlgo(ctx context.Context, algoID int64) ([]AlgorithmExecutionPath, error)
- func (q *Queries) ReadAlgorithmId(ctx context.Context, arg ReadAlgorithmIdParams) (int64, error)
- func (q *Queries) ReadAlgorithms(ctx context.Context) ([]Algorithm, error)
- func (q *Queries) ReadAlgorithmsForProcessorId(ctx context.Context, processorID int64) ([]Algorithm, error)
- func (q *Queries) ReadAlgorithmsForWindow(ctx context.Context, arg ReadAlgorithmsForWindowParams) ([]Algorithm, error)
- func (q *Queries) ReadFromAlgorithmDependencies(ctx context.Context, arg ReadFromAlgorithmDependenciesParams) ([]AlgorithmDependency, error)
- func (q *Queries) ReadMetadataFields(ctx context.Context) ([]MetadataField, error)
- func (q *Queries) ReadMetadataFieldsByWindowType(ctx context.Context, windowTypeID int64) ([]MetadataField, error)
- func (q *Queries) ReadProcessorExcludeProject(ctx context.Context, projectName pgtype.Text) ([]Processor, error)
- func (q *Queries) ReadProcessors(ctx context.Context) ([]Processor, error)
- func (q *Queries) ReadProcessorsByIDs(ctx context.Context, processorIds []int64) ([]Processor, error)
- func (q *Queries) ReadResultsForAlgorithmByCount(ctx context.Context, arg ReadResultsForAlgorithmByCountParams) ([]ReadResultsForAlgorithmByCountRow, error)
- func (q *Queries) ReadResultsForAlgorithmByTimedelta(ctx context.Context, arg ReadResultsForAlgorithmByTimedeltaParams) ([]ReadResultsForAlgorithmByTimedeltaRow, error)
- func (q *Queries) ReadWindowTypeMetadataFields(ctx context.Context) ([]WindowTypeMetadataField, error)
- func (q *Queries) ReadWindowTypes(ctx context.Context) ([]WindowType, error)
- func (q *Queries) ReadWindowTypesByName(ctx context.Context, arg ReadWindowTypesByNameParams) ([]WindowType, error)
- func (q *Queries) RegisterMetadata(ctx context.Context, arg RegisterMetadataParams) error
- func (q *Queries) RegisterWindow(ctx context.Context, arg RegisterWindowParams) (RegisterWindowRow, error)
- func (q *Queries) UpdateResultState(ctx context.Context, arg UpdateResultStateParams) error
- func (q *Queries) UpdateWindowState(ctx context.Context, arg UpdateWindowStateParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type ReadAlgorithmIdParams
- type ReadAlgorithmsForWindowParams
- type ReadFromAlgorithmDependenciesParams
- type ReadResultsForAlgorithmByCountParams
- type ReadResultsForAlgorithmByCountRow
- type ReadResultsForAlgorithmByTimedeltaParams
- type ReadResultsForAlgorithmByTimedeltaRow
- type ReadWindowTypesByNameParams
- type RegisterMetadataParams
- type RegisterWindowParams
- type RegisterWindowRow
- type Result
- type ResultType
- type UpdateResultStateParams
- type UpdateWindowStateParams
- type Window
- type WindowState
- type WindowType
- type WindowTypeMetadataField
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AlgorithmExistsUnderDifferentProcessor = fmt.Errorf(
"algorithm exists under a different processor",
)
)
custom errors
Functions ¶
This section is empty.
Types ¶
type AlgorithmDependency ¶
type AlgorithmExecutionPath ¶
type AlgorithmExecutionPath struct {
FinalAlgoID int64
NumDependencies int32
AlgoIDPath string
WindowTypeIDPath string
ProcIDPath string
LookbackCountPath string
LookbackTimedeltaPath string
SelfLookbackCountPath string
SelfLookbackTimedeltaPath string
LookbackGapCountPath string
LookbackGapTimedeltaPath string
SelfLookbackGapCountPath string
SelfLookbackGapTimedeltaPath string
}
type AlgorithmState ¶
type AlgorithmState string
const ( AlgorithmStatePENDING AlgorithmState = "PENDING" AlgorithmStatePROCESSING AlgorithmState = "PROCESSING" AlgorithmStateSUCCEEDED AlgorithmState = "SUCCEEDED" AlgorithmStateFAILEDHANDLED AlgorithmState = "FAILED_HANDLED" AlgorithmStateFAILEDUNHANDLED AlgorithmState = "FAILED_UNHANDLED" )
func (*AlgorithmState) Scan ¶
func (e *AlgorithmState) Scan(src interface{}) error
type Annotation ¶
type Annotation struct {
ID int64
// Start time of the annotation time window
TimeFrom pgtype.Timestamp
// End time of the annotation time window
TimeTo pgtype.Timestamp
Metadata []byte
// Detailed description of the annotation
Description pgtype.Text
CreatedAt pgtype.Timestamp
}
Plot annotations with time ranges and metadata
type AnnotationAlgorithm ¶
Junction table linking annotations to algorithms
type AnnotationWindowType ¶
Junction table linking annotations to window types
type CircularDependencyError ¶
type CircularDependencyError struct {
FromAlgoName string
ToAlgoName string
FromAlgoVersion string
ToAlgoVersion string
FromAlgoProcessor string
ToAlgoProcessor string
}
func (*CircularDependencyError) Error ¶
func (c *CircularDependencyError) Error() string
type CreateAlgorithmDependencyParams ¶
type CreateAlgorithmDependencyParams struct {
LookbackCount int64
LookbackTimedelta int64
LookbackGapCount int64
LookbackGapTimedelta int64
FromAlgorithmName string
FromAlgorithmVersion string
FromProcessorName string
FromProcessorRuntime string
ToAlgorithmName string
ToAlgorithmVersion string
ToProcessorName string
ToProcessorRuntime string
}
type CreateAlgorithmParams ¶
type CreateAlgorithmParams struct {
Name string
Version string
Description string
ResultType ResultType
SelfLookbackCount int64
SelfLookbackTimedelta int64
SelfLookbackGapCount int64
SelfLookbackGapTimedelta int64
ProcessorName string
ProcessorRuntime string
WindowTypeName string
WindowTypeVersion string
}
type CreateProcessorParams ¶
type CreateResultParams ¶
type CreateWindowTypeParams ¶
type Datalayer ¶
type Datalayer struct {
// contains filtered or unexported fields
}
func (*Datalayer) EmitWindow ¶
func (d *Datalayer) EmitWindow( ctx context.Context, window *pb.Window, useTls bool, ) (_ pb.WindowEmitStatus, retErr error)
EmitWindow with Orca core
func (*Datalayer) Expose ¶
func (d *Datalayer) Expose( ctx context.Context, settings *pb.ExposeSettings, ) (_ *pb.InternalState, retErr error)
func (*Datalayer) RegisterProcessor ¶
func (d *Datalayer) RegisterProcessor( ctx context.Context, proc *pb.ProcessorRegistration, ) (retErr error)
RegisterProcessor with Orca Core
type FinaliseResultParams ¶
type MetadataField ¶
type MetadataFieldsReference ¶
type MetadataFilter ¶
converts a structpb struct to a form that can be used to filter metadata in the db
type NullAlgorithmState ¶
type NullAlgorithmState struct {
AlgorithmState AlgorithmState
Valid bool // Valid is true if AlgorithmState is not NULL
}
func (*NullAlgorithmState) Scan ¶
func (ns *NullAlgorithmState) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullResultType ¶
type NullResultType struct {
ResultType ResultType
Valid bool // Valid is true if ResultType is not NULL
}
func (*NullResultType) Scan ¶
func (ns *NullResultType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullWindowState ¶
type NullWindowState struct {
WindowState WindowState
Valid bool // Valid is true if WindowState is not NULL
}
func (*NullWindowState) Scan ¶
func (ns *NullWindowState) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateAlgorithm ¶
func (q *Queries) CreateAlgorithm(ctx context.Context, arg CreateAlgorithmParams) error
func (*Queries) CreateAlgorithmDependency ¶
func (q *Queries) CreateAlgorithmDependency(ctx context.Context, arg CreateAlgorithmDependencyParams) error
func (*Queries) CreateMetadataField ¶
func (*Queries) CreateProcessor ¶
func (q *Queries) CreateProcessor(ctx context.Context, arg CreateProcessorParams) error
func (*Queries) CreateResult ¶
func (*Queries) CreateWindowType ¶
func (*Queries) CreateWindowTypeMetadataFieldBridge ¶
func (q *Queries) CreateWindowTypeMetadataFieldBridge(ctx context.Context, arg CreateWindowTypeMetadataFieldBridgeParams) error
func (*Queries) FinaliseResult ¶
func (q *Queries) FinaliseResult(ctx context.Context, arg FinaliseResultParams) error
func (*Queries) ReadAlgorithmExecutionPaths ¶
func (*Queries) ReadAlgorithmExecutionPathsForAlgo ¶
func (*Queries) ReadAlgorithmId ¶
func (*Queries) ReadAlgorithms ¶
func (*Queries) ReadAlgorithmsForProcessorId ¶
func (*Queries) ReadAlgorithmsForWindow ¶
func (*Queries) ReadFromAlgorithmDependencies ¶
func (q *Queries) ReadFromAlgorithmDependencies(ctx context.Context, arg ReadFromAlgorithmDependenciesParams) ([]AlgorithmDependency, error)
func (*Queries) ReadMetadataFields ¶
func (q *Queries) ReadMetadataFields(ctx context.Context) ([]MetadataField, error)
func (*Queries) ReadMetadataFieldsByWindowType ¶
func (*Queries) ReadProcessorExcludeProject ¶
func (*Queries) ReadProcessors ¶
func (*Queries) ReadProcessorsByIDs ¶
func (*Queries) ReadResultsForAlgorithmByCount ¶
func (q *Queries) ReadResultsForAlgorithmByCount(ctx context.Context, arg ReadResultsForAlgorithmByCountParams) ([]ReadResultsForAlgorithmByCountRow, error)
func (*Queries) ReadResultsForAlgorithmByTimedelta ¶
func (q *Queries) ReadResultsForAlgorithmByTimedelta(ctx context.Context, arg ReadResultsForAlgorithmByTimedeltaParams) ([]ReadResultsForAlgorithmByTimedeltaRow, error)
func (*Queries) ReadWindowTypeMetadataFields ¶
func (q *Queries) ReadWindowTypeMetadataFields(ctx context.Context) ([]WindowTypeMetadataField, error)
func (*Queries) ReadWindowTypes ¶
func (q *Queries) ReadWindowTypes(ctx context.Context) ([]WindowType, error)
func (*Queries) ReadWindowTypesByName ¶
func (q *Queries) ReadWindowTypesByName(ctx context.Context, arg ReadWindowTypesByNameParams) ([]WindowType, error)
func (*Queries) RegisterMetadata ¶
func (q *Queries) RegisterMetadata(ctx context.Context, arg RegisterMetadataParams) error
func (*Queries) RegisterWindow ¶
func (q *Queries) RegisterWindow(ctx context.Context, arg RegisterWindowParams) (RegisterWindowRow, error)
func (*Queries) UpdateResultState ¶
func (q *Queries) UpdateResultState(ctx context.Context, arg UpdateResultStateParams) error
func (*Queries) UpdateWindowState ¶
func (q *Queries) UpdateWindowState(ctx context.Context, arg UpdateWindowStateParams) error
type ReadAlgorithmIdParams ¶
type ReadResultsForAlgorithmByCountRow ¶
type ReadResultsForAlgorithmByCountRow struct {
ResultID int64
AlgorithmID pgtype.Int8
WindowID int64
ResultType ResultType
ResultValue pgtype.Float8
ResultArray []float64
ResultJson []byte
WindowTypeName string
WindowTypeVersion string
WindowTimeFrom pgtype.Timestamp
WindowTimeTo pgtype.Timestamp
WindowOrigin string
WindowMetadata []byte
}
type ReadResultsForAlgorithmByTimedeltaRow ¶
type ReadResultsForAlgorithmByTimedeltaRow struct {
ResultID int64
AlgorithmID pgtype.Int8
WindowID int64
ResultType ResultType
ResultValue pgtype.Float8
ResultArray []float64
ResultJson []byte
WindowTypeName string
WindowTypeVersion string
WindowTimeFrom pgtype.Timestamp
WindowTimeTo pgtype.Timestamp
WindowOrigin string
WindowMetadata []byte
}
type RegisterMetadataParams ¶
type RegisterWindowParams ¶
type RegisterWindowRow ¶
type ResultType ¶
type ResultType string
const ( ResultTypeStruct ResultType = "struct" ResultTypeArray ResultType = "array" ResultTypeValue ResultType = "value" ResultTypeNone ResultType = "none" )
func (*ResultType) Scan ¶
func (e *ResultType) Scan(src interface{}) error
type UpdateResultStateParams ¶
type UpdateResultStateParams struct {
State AlgorithmState
ResultID int64
}
type UpdateWindowStateParams ¶
type UpdateWindowStateParams struct {
State WindowState
WindowID int64
}
type WindowState ¶
type WindowState string
const ( WindowStatePENDING WindowState = "PENDING" WindowStateFAILED WindowState = "FAILED" WindowStatePROCESSING WindowState = "PROCESSING" WindowStatePROCESSINGFINISHED WindowState = "PROCESSING_FINISHED" )
func (*WindowState) Scan ¶
func (e *WindowState) Scan(src interface{}) error
type WindowType ¶
Click to show internal directories.
Click to hide internal directories.