command

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 ...

func NewCommands

func NewCommands(svc domain.Service) *Commands

NewCommands ...

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

type ExternalBucketAuthInfo struct {
	Bucket string
	AK     string
	SK     string
}

ExternalBucketAuthInfo ...

type GPUResource

type GPUResource struct {
	Count float64 `validate:"gt=0"`
	Type  string
}

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 ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL