Documentation ¶
Index ¶
- func SetDefaultJobParams(job *model.JobM)
- func ShouldSkipOnIdempotency(job *model.JobM, condType string) bool
- type Limiter
- type StateMachine
- func (sm *StateMachine) Download(ctx context.Context, event *fsm.Event) error
- func (sm *StateMachine) Embedding(ctx context.Context, event *fsm.Event) error
- func (sm *StateMachine) EnterState(ctx context.Context, event *fsm.Event) error
- func (sm *StateMachine) Train(ctx context.Context, event *fsm.Event) error
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultJobParams ¶
SetDefaultJobParams sets default parameters for the job if they are not already set.
Types ¶
type StateMachine ¶
StateMachine represents a finite state machine for managing daily estimation jobs.
func NewStateMachine ¶
func NewStateMachine(initial string, watcher *Watcher, job *model.JobM) *StateMachine
NewStateMachine initializes a new StateMachine with the given initial state, watcher, and job. It configures the FSM with defined events and their corresponding state transitions, as well as callbacks for entering specific states.
func (*StateMachine) EnterState ¶
EnterState handles the state transition of the state machine and updates the Job's status and conditions based on the event.
type Watcher ¶
type Watcher struct { //Metric metrics.Metric Train *train.TrainManager Minio minio.IMinio Store store.IStore // Maximum number of concurrent workers. MaxWorkers int64 // Rate limiters for operations. Limiter Limiter }
Watcher monitors and processes daily estimation jobs.
func (*Watcher) SetAggregateConfig ¶
func (w *Watcher) SetAggregateConfig(config *watcher.AggregateConfig)
SetAggregateConfig configures the watcher with the provided aggregate configuration.
func (*Watcher) SetMaxWorkers ¶
SetMaxWorkers sets the maximum number of concurrent workers for the watcher.