Documentation ¶
Index ¶
- Constants
- Variables
- func GetDataResolver() resolve.CompositeResolver
- func GetManager() *resource.Manager
- func GetMapperFactory() mapper.Factory
- func NewDefaultOperationOutputMapper(stage *Stage) mapper.Mapper
- func NewPipelineScope(input map[string]interface{}, labels map[string]interface{}) (data.Scope, error)
- func NewResourceLoader(mapperFactory mapper.Factory, resolver resolve.CompositeResolver) resource.Loader
- func SetMapperFactory(factory mapper.Factory)
- type BasicRemotePipelineProvider
- type Definition
- type DefinitionConfig
- type Instance
- type Manager
- type NewDefaultMapperFactory
- type PipelineInput
- type PipelineOutput
- type ResourceLoader
- type Stage
- type StageConfig
- type Task
- type TaskConfig
- type TaskImpl
Constants ¶
View Source
const (
ResType = "cam"
)
Variables ¶
View Source
var DefaultManager *resource.Manager
Functions ¶
func GetDataResolver ¶
func GetDataResolver() resolve.CompositeResolver
func GetManager ¶
func GetMapperFactory ¶
func NewPipelineScope ¶
func NewPipelineScope(input map[string]interface{}, labels map[string]interface{}) (data.Scope, error)
NewPipelineScope gets the scope from the input and label map.
func NewResourceLoader ¶
func SetMapperFactory ¶
Types ¶
type BasicRemotePipelineProvider ¶
type BasicRemotePipelineProvider struct { }
func (*BasicRemotePipelineProvider) GetPipeline ¶
func (*BasicRemotePipelineProvider) GetPipeline(pipelineURI string) (*DefinitionConfig, error)
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
Defination struct
func NewDefinition ¶
func NewDefinition(config *DefinitionConfig, mf mapper.Factory, resolver resolve.CompositeResolver) (*Definition, error)
NewDefinition gets a defination struct from config.
func (*Definition) MetaData ¶ added in v0.2.5
func (d *Definition) MetaData() *metadata.IOMetadata
func (*Definition) Name ¶
func (d *Definition) Name() string
type DefinitionConfig ¶
type DefinitionConfig struct { Name string `json:"name"` Tasks []TaskConfig `json:"structure"` Input []PipelineInput `json:"input"` Output PipelineOutput `json:"output"` }
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func NewInstance ¶
func NewInstance(definition *Definition, id string, logger log.Logger) *Instance
NewInstance gets new instance from defination
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetPipeline ¶
func (m *Manager) GetPipeline(uri string) (*Definition, error)
type NewDefaultMapperFactory ¶
type NewDefaultMapperFactory struct { }
type PipelineInput ¶
type PipelineInput struct { Type string `json:"type"` Dimension int `json:"dimension"` Shape []int `json:"shape"` Label interface{} `json:"label"` }
Input of the CML Pipeline.
type PipelineOutput ¶
type PipelineOutput struct { Type string `json:"type"` Data interface{} `json:"data"` }
Output of CML Pipeline
type ResourceLoader ¶
type ResourceLoader struct {
// contains filtered or unexported fields
}
func (*ResourceLoader) LoadResource ¶
Load Reasource from the config.
type Stage ¶
type Stage struct {
// contains filtered or unexported fields
}
func NewStage ¶
func NewStage(config *StageConfig, mf mapper.Factory, resolver resolve.CompositeResolver) (*Stage, error)
NewStage gets the satage from the stage config.
type StageConfig ¶
type Task ¶ added in v0.2.5
type Task interface { Eval(scope data.Scope, logger log.Logger) (data.Scope, error) Name() string Position() }
func NewTask ¶ added in v0.2.5
func NewTask(config TaskConfig, mf mapper.Factory, resolver resolve.CompositeResolver) (Task, error)
NewTask returns a Task based on the TaskConfig.
type TaskConfig ¶ added in v0.2.5
type TaskConfig struct { Operation string `json:"operation,required"` Params interface{} `json:"params,omitempty"` Input interface{} `json:"input,omitempty"` Output interface{} `json:"output,required"` }
Config of Task.
Click to show internal directories.
Click to hide internal directories.