Documentation
¶
Index ¶
- type BioosInfo
- type BioosInfoMeta
- type BucketsAuthInfo
- type CancelCommand
- type CancelHandler
- type Commands
- type CreateCommand
- type CreateHandler
- type Executor
- type ExecutorLog
- type ExternalBucketAuthInfo
- type GPUResource
- type Input
- type Output
- type Resources
- type TaskLog
- type UpdateCommand
- type UpdateHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BioosInfo ¶
type BioosInfo struct {
AccountID string
UserID string
SubmissionID string
RunID string
Meta *BioosInfoMeta
}
BioosInfo ...
type BioosInfoMeta ¶
type BioosInfoMeta struct {
AAIPassport *string
MountTOS *bool
BucketsAuthInfo *BucketsAuthInfo
}
BioosInfoMeta ...
type BucketsAuthInfo ¶
type BucketsAuthInfo struct {
ReadOnly []string
ReadWrite []string
External []*ExternalBucketAuthInfo
}
BucketsAuthInfo ...
type CancelCommand ¶
type CancelCommand struct {
ID string `validate:"required"`
}
CancelCommand ...
type CancelHandler ¶
type CancelHandler interface {
Handle(ctx context.Context, cmd *CancelCommand) error
}
CancelHandler ...
func NewCancelHandler ¶
func NewCancelHandler(svc domain.Service) CancelHandler
NewCancelHandler ...
type Commands ¶
type Commands struct {
Create CreateHandler
Cancel CancelHandler
Update UpdateHandler
}
Commands ...
type CreateCommand ¶
type CreateCommand struct {
Name string
Description string
Inputs []*Input `validate:"dive"`
Outputs []*Output `validate:"dive"`
Resources *Resources
Executors []*Executor `validate:"gt=0,dive"`
Volumes []string
Tags map[string]string
BioosInfo *BioosInfo
PriorityValue int
}
CreateCommand ...
type CreateHandler ¶
type CreateHandler interface {
Handle(ctx context.Context, cmd *CreateCommand) (string, error)
}
CreateHandler ...
func NewCreateHandler ¶
func NewCreateHandler(svc domain.Service) CreateHandler
NewCreateHandler ...
type Executor ¶
type Executor struct {
Image string `validate:"required"`
Command []string `validate:"gt=0,dive,required"`
Workdir string `validate:"omitempty,abspath"`
Stdin string `validate:"omitempty,abspath"`
Stdout string `validate:"omitempty,abspath"`
Stderr string `validate:"omitempty,abspath"`
Env map[string]string
}
Executor ...
type ExecutorLog ¶
type ExecutorLog struct {
ExecutorID string `validate:"required"`
StartTime *time.Time
EndTime *time.Time
}
ExecutorLog ...
type ExternalBucketAuthInfo ¶
ExternalBucketAuthInfo ...
type GPUResource ¶
GPUResource ...
type Input ¶
type Input struct {
Name string
Description string
Path string `validate:"required,abspath"`
Type string `validate:"oneof=FILE DIRECTORY"`
URL string `validate:"required_without=Content,omitempty,uri"`
Content string `validate:"required_without=URL"`
}
Input ...
type Output ¶
type Output struct {
Name string
Description string
Path string `validate:"required,abspath"`
Type string `validate:"oneof=FILE DIRECTORY"`
URL string `validate:"required,uri"`
}
Output ...
type Resources ¶
type Resources struct {
CPUCores int `validate:"gte=0"`
RamGB float64 `validate:"gte=0"` // nolint
DiskGB float64 `validate:"gte=0"`
BootDiskGB *int `validate:"omitempty,gte=0"`
GPU *GPUResource
}
Resources ...
type TaskLog ¶
type TaskLog struct {
ClusterID string `validate:"required"`
Logs [][]*ExecutorLog `validate:"dive,unique=ExecutorID,dive"`
StartTime *time.Time
EndTime *time.Time
SystemLogs []string
}
TaskLog ...
type UpdateCommand ¶
type UpdateCommand struct {
ID string `validate:"required"`
ClusterID *string
State *string `validate:"omitempty,oneof=QUEUED INITIALIZING RUNNING COMPLETE SYSTEM_ERROR EXECUTOR_ERROR CANCELING CANCELED"`
Logs []*TaskLog `validate:"unique=ClusterID,dive"`
}
UpdateCommand ...
type UpdateHandler ¶
type UpdateHandler interface {
Handle(ctx context.Context, cmd *UpdateCommand) error
}
UpdateHandler ...
func NewUpdateHandler ¶
func NewUpdateHandler(svc domain.Service) UpdateHandler
NewUpdateHandler ...