Documentation
¶
Index ¶
- Variables
- type BaseGElement
- func (e *BaseGElement) CreateGParam(key string, param GParam) *CStatus
- func (e *BaseGElement) Destroy() *CStatus
- func (e *BaseGElement) GetGParam(key string) GParam
- func (e *BaseGElement) GetName() string
- func (e *BaseGElement) Init() *CStatus
- func (e *BaseGElement) SetName(name string)
- func (e *BaseGElement) SetParamManager(pm *GParamManager)
- type BaseGParam
- type CStatus
- type GElement
- type GNode
- type GParam
- type GParamManager
- type GPipeline
- type GPipelineFactory
- type Schedule
Constants ¶
This section is empty.
Variables ¶
var Factory = &GPipelineFactory{}
Global factory instance for convenience
Functions ¶
This section is empty.
Types ¶
type BaseGElement ¶
type BaseGElement struct {
// contains filtered or unexported fields
}
BaseGElement provides a basic implementation that other nodes can embed
func (*BaseGElement) CreateGParam ¶
func (e *BaseGElement) CreateGParam(key string, param GParam) *CStatus
CreateGParam creates a parameter with the specified key and type
func (*BaseGElement) Destroy ¶
func (e *BaseGElement) Destroy() *CStatus
Destroy provides default destruction
func (*BaseGElement) GetGParam ¶
func (e *BaseGElement) GetGParam(key string) GParam
GetGParam retrieves a parameter by key
func (*BaseGElement) GetName ¶
func (e *BaseGElement) GetName() string
GetName returns the node name
func (*BaseGElement) Init ¶
func (e *BaseGElement) Init() *CStatus
Init provides default initialization
func (*BaseGElement) SetName ¶
func (e *BaseGElement) SetName(name string)
SetName sets the node name
func (*BaseGElement) SetParamManager ¶
func (e *BaseGElement) SetParamManager(pm *GParamManager)
SetParamManager sets the parameter manager
type BaseGParam ¶
type BaseGParam struct {
// contains filtered or unexported fields
}
BaseGParam provides a default implementation of GParam
func (*BaseGParam) GetLock ¶
func (p *BaseGParam) GetLock() *sync.RWMutex
GetLock returns the shared lock for thread safety
func (*BaseGParam) Reset ¶
func (p *BaseGParam) Reset(curStatus *CStatus)
Reset provides default parameter reset
func (*BaseGParam) Setup ¶
func (p *BaseGParam) Setup() *CStatus
Setup provides default parameter initialization
type CStatus ¶
type CStatus struct {
// contains filtered or unexported fields
}
CStatus represents the execution result status
func NewCStatusWithError ¶
NewCStatusWithError creates a new error status
type GElement ¶
type GElement interface {
Init() *CStatus
Run() *CStatus
Destroy() *CStatus
GetName() string
// Parameter management methods
CreateGParam(key string, param GParam) *CStatus
GetGParam(key string) GParam
}
GElement represents a node in the DAG
type GParamManager ¶
type GParamManager struct {
// contains filtered or unexported fields
}
GParamManager manages the lifecycle of all shared parameters
func NewGParamManager ¶
func NewGParamManager() *GParamManager
NewGParamManager creates a new parameter manager
func (*GParamManager) Create ¶
func (pm *GParamManager) Create(key string, param GParam) *CStatus
Create creates a parameter with the specified key and type
func (*GParamManager) Get ¶
func (pm *GParamManager) Get(key string) GParam
Get retrieves a parameter by key
func (*GParamManager) Reset ¶
func (pm *GParamManager) Reset(curStatus *CStatus)
Reset resets all parameters
func (*GParamManager) Setup ¶
func (pm *GParamManager) Setup() *CStatus
Setup initializes all parameters
type GPipeline ¶
type GPipeline struct {
// contains filtered or unexported fields
}
GPipeline manages the entire DAG execution flow
type GPipelineFactory ¶
type GPipelineFactory struct{}
GPipelineFactory provides factory methods for pipeline creation and destruction
func (*GPipelineFactory) Create ¶
func (f *GPipelineFactory) Create() *GPipeline
Create creates a new pipeline instance
func (*GPipelineFactory) Remove ¶
func (f *GPipelineFactory) Remove(pipeline *GPipeline) *CStatus
Remove destroys a pipeline instance
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
Schedule implements a thread pool and task queue for concurrent execution
func NewSchedule ¶
NewSchedule creates a new scheduler with specified number of workers