Documentation ¶
Index ¶
- Constants
- func NewDataModel(srcDataModel *workspaceproto.DataModel, srcHeader []string, ...) *dataModel
- type CancelHandler
- type CreateRunParam
- type CreateTaskParam
- type DeleteHandler
- type EventHandlerCreateRuns
- type EventHandlerSubmitRun
- type EventHandlerSyncRun
- type Factory
- type Repository
- type Run
- type Service
- type Task
Constants ¶
View Source
const (
BioosRunIDKey = "bioos-run-id"
)
Variables ¶
This section is empty.
Functions ¶
func NewDataModel ¶
func NewDataModel(srcDataModel *workspaceproto.DataModel, srcHeader []string, srcRows []*workspaceproto.Row) *dataModel
Types ¶
type CancelHandler ¶
type CancelHandler struct {
// contains filtered or unexported fields
}
func NewEventHandlerCancelRun ¶
func NewEventHandlerCancelRun(wes wes.Client, repository Repository, eventbus eventbus.EventBus) *CancelHandler
func (*CancelHandler) Handle ¶
func (h *CancelHandler) Handle(ctx context.Context, event *submission.EventRun) (err error)
type CreateRunParam ¶
type CreateTaskParam ¶
type DeleteHandler ¶
type DeleteHandler struct {
// contains filtered or unexported fields
}
func NewEventHandlerDeleteRun ¶
func NewEventHandlerDeleteRun(repository Repository, eventbus eventbus.EventBus) *DeleteHandler
func (*DeleteHandler) Handle ¶
func (h *DeleteHandler) Handle(ctx context.Context, event *submission.EventRun) (err error)
type EventHandlerCreateRuns ¶
type EventHandlerCreateRuns struct {
// contains filtered or unexported fields
}
save submission -> save runs
func NewEventHandlerCreateRuns ¶
func NewEventHandlerCreateRuns(repo Repository, client grpc.DataModelClient, eventBus eventbus.EventBus, runFactory Factory) *EventHandlerCreateRuns
func (*EventHandlerCreateRuns) Handle ¶
func (e *EventHandlerCreateRuns) Handle(ctx context.Context, event *submission.EventCreateRuns) error
func (*EventHandlerCreateRuns) Publish ¶
func (e *EventHandlerCreateRuns) Publish(ctx context.Context, run *Run, event *submission.EventCreateRuns) error
type EventHandlerSubmitRun ¶
type EventHandlerSubmitRun struct {
// contains filtered or unexported fields
}
func NewEventHandlerSubmitRun ¶
func NewEventHandlerSubmitRun(wesClient wes.Client, eventBus eventbus.EventBus, runRepo Repository) *EventHandlerSubmitRun
func (*EventHandlerSubmitRun) Handle ¶
func (e *EventHandlerSubmitRun) Handle(ctx context.Context, event *submission.EventSubmitRun) error
type EventHandlerSyncRun ¶
type EventHandlerSyncRun struct {
// contains filtered or unexported fields
}
EventHandlerSyncRun submit run -> list run/task
func NewEventHandlerSyncRun ¶
func NewEventHandlerSyncRun(wesClient wes.Client, runRepo Repository, runFactory Factory, eventBus eventbus.EventBus) *EventHandlerSyncRun
func (*EventHandlerSyncRun) Handle ¶
func (e *EventHandlerSyncRun) Handle(ctx context.Context, event *submission.EventRun) error
type Factory ¶
type Factory struct{}
Factory workspace factory.
func NewRunFactory ¶
NewRunFactory return a workspace factory.
func (*Factory) CreateWithRunParam ¶
func (fac *Factory) CreateWithRunParam(param CreateRunParam) (*Run, error)
CreateWithRunParam ...
func (*Factory) CreateWithTaskParam ¶
func (fac *Factory) CreateWithTaskParam(param CreateTaskParam) (*Task, error)
CreateWithTaskParam ...
type Repository ¶
type Repository interface { Save(ctx context.Context, r *Run) error Get(ctx context.Context, id string) (*Run, error) Delete(ctx context.Context, r *Run) error }
Repository allows to get/save events from/to event store.
type Run ¶
type Run struct { ID string Name string SubmissionID string Inputs map[string]interface{} `gorm:"serializer:json"` Outputs *map[string]interface{} `gorm:"serializer:json"` EngineRunID string Status string Log *string Message *string StartTime time.Time FinishTime *time.Time Tasks []*Task }
Run ...
func (*Run) IsCancelling ¶
func (*Run) IsFinished ¶
type Service ¶
type Service interface { Upsert(context.Context, *Run, []*Task) error Create(context.Context, *Run, []*Task) error Update(context.Context, *Run, []*Task) error Delete(ctx context.Context, id string) error Cancel(ctx context.Context, id string) error CheckWorkspaceExist(ctx context.Context, workspaceID string) error }
func NewService ¶
Click to show internal directories.
Click to hide internal directories.