Documentation
¶
Overview ¶
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Package domain is a generated GoMock package.
Index ¶
- func GenTaskID() string
- type BioosInfo
- type BioosInfoMeta
- type BucketsAuthInfo
- type Executor
- type ExecutorLog
- type ExternalBucketAuthInfo
- type FakeNormalizer
- type FakeNormalizerMockRecorder
- type FakeRepo
- func (m *FakeRepo) CheckIDExist(ctx context.Context, id string) (bool, error)
- func (m *FakeRepo) Create(ctx context.Context, task *Task) error
- func (m *FakeRepo) EXPECT() *FakeRepoMockRecorder
- func (m *FakeRepo) GetStatus(ctx context.Context, id string) (*TaskStatus, error)
- func (m *FakeRepo) UpdateStatus(ctx context.Context, taskStatus *TaskStatus) (bool, error)
- type FakeRepoMockRecorder
- func (mr *FakeRepoMockRecorder) CheckIDExist(ctx, id interface{}) *gomock.Call
- func (mr *FakeRepoMockRecorder) Create(ctx, task interface{}) *gomock.Call
- func (mr *FakeRepoMockRecorder) GetStatus(ctx, id interface{}) *gomock.Call
- func (mr *FakeRepoMockRecorder) UpdateStatus(ctx, taskStatus interface{}) *gomock.Call
- type FakeService
- func (m *FakeService) Cancel(ctx context.Context, id string) error
- func (m *FakeService) Create(ctx context.Context, task *Task) (string, error)
- func (m *FakeService) EXPECT() *FakeServiceMockRecorder
- func (m *FakeService) Update(ctx context.Context, id string, state, clusterID *string, logs []*TaskLog) error
- type FakeServiceMockRecorder
- type GPUResource
- type Input
- type Normalizer
- type Output
- type Repo
- type Resources
- type Service
- type Task
- type TaskLog
- type TaskStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 Executor ¶
type Executor struct {
Image string
Command []string
Workdir string
Stdin string
Stdout string
Stderr string
Env map[string]string
}
Executor ...
type ExecutorLog ¶
ExecutorLog ...
type ExternalBucketAuthInfo ¶
ExternalBucketAuthInfo ...
type FakeNormalizer ¶
type FakeNormalizer struct {
// contains filtered or unexported fields
}
FakeNormalizer is a mock of Normalizer interface.
func NewFakeNormalizer ¶
func NewFakeNormalizer(ctrl *gomock.Controller) *FakeNormalizer
NewFakeNormalizer creates a new mock instance.
func (*FakeNormalizer) EXPECT ¶
func (m *FakeNormalizer) EXPECT() *FakeNormalizerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*FakeNormalizer) Normalize ¶
func (m *FakeNormalizer) Normalize(task *Task) error
Normalize mocks base method.
type FakeNormalizerMockRecorder ¶
type FakeNormalizerMockRecorder struct {
// contains filtered or unexported fields
}
FakeNormalizerMockRecorder is the mock recorder for FakeNormalizer.
func (*FakeNormalizerMockRecorder) Normalize ¶
func (mr *FakeNormalizerMockRecorder) Normalize(task interface{}) *gomock.Call
Normalize indicates an expected call of Normalize.
type FakeRepo ¶
type FakeRepo struct {
// contains filtered or unexported fields
}
FakeRepo is a mock of Repo interface.
func NewFakeRepo ¶
func NewFakeRepo(ctrl *gomock.Controller) *FakeRepo
NewFakeRepo creates a new mock instance.
func (*FakeRepo) CheckIDExist ¶
CheckIDExist mocks base method.
func (*FakeRepo) EXPECT ¶
func (m *FakeRepo) EXPECT() *FakeRepoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*FakeRepo) UpdateStatus ¶
UpdateStatus mocks base method.
type FakeRepoMockRecorder ¶
type FakeRepoMockRecorder struct {
// contains filtered or unexported fields
}
FakeRepoMockRecorder is the mock recorder for FakeRepo.
func (*FakeRepoMockRecorder) CheckIDExist ¶
func (mr *FakeRepoMockRecorder) CheckIDExist(ctx, id interface{}) *gomock.Call
CheckIDExist indicates an expected call of CheckIDExist.
func (*FakeRepoMockRecorder) Create ¶
func (mr *FakeRepoMockRecorder) Create(ctx, task interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*FakeRepoMockRecorder) GetStatus ¶
func (mr *FakeRepoMockRecorder) GetStatus(ctx, id interface{}) *gomock.Call
GetStatus indicates an expected call of GetStatus.
func (*FakeRepoMockRecorder) UpdateStatus ¶
func (mr *FakeRepoMockRecorder) UpdateStatus(ctx, taskStatus interface{}) *gomock.Call
UpdateStatus indicates an expected call of UpdateStatus.
type FakeService ¶
type FakeService struct {
// contains filtered or unexported fields
}
FakeService is a mock of Service interface.
func NewFakeService ¶
func NewFakeService(ctrl *gomock.Controller) *FakeService
NewFakeService creates a new mock instance.
func (*FakeService) Cancel ¶
func (m *FakeService) Cancel(ctx context.Context, id string) error
Cancel mocks base method.
func (*FakeService) EXPECT ¶
func (m *FakeService) EXPECT() *FakeServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type FakeServiceMockRecorder ¶
type FakeServiceMockRecorder struct {
// contains filtered or unexported fields
}
FakeServiceMockRecorder is the mock recorder for FakeService.
func (*FakeServiceMockRecorder) Cancel ¶
func (mr *FakeServiceMockRecorder) Cancel(ctx, id interface{}) *gomock.Call
Cancel indicates an expected call of Cancel.
func (*FakeServiceMockRecorder) Create ¶
func (mr *FakeServiceMockRecorder) Create(ctx, task interface{}) *gomock.Call
Create indicates an expected call of Create.
func (*FakeServiceMockRecorder) Update ¶
func (mr *FakeServiceMockRecorder) Update(ctx, id, state, clusterID, logs interface{}) *gomock.Call
Update indicates an expected call of Update.
type Input ¶
type Input struct {
Name string
Description string
Path string
Type string
URL string
Content string
}
Input ...
type Repo ¶
type Repo interface {
Create(ctx context.Context, task *Task) error
GetStatus(ctx context.Context, id string) (*TaskStatus, error)
UpdateStatus(ctx context.Context, taskStatus *TaskStatus) (bool, error)
CheckIDExist(ctx context.Context, id string) (bool, error)
}
Repo ...
type Resources ¶
type Resources struct {
CPUCores int
RamGB float64 // nolint
DiskGB float64
BootDiskGB *int
GPU *GPUResource
}
Resources ...
type Service ¶
type Service interface {
Create(ctx context.Context, task *Task) (string, error)
Cancel(ctx context.Context, id string) error
Update(ctx context.Context, id string, state, clusterID *string, logs []*TaskLog) error
}
Service ...
type Task ¶
type Task struct {
TaskStatus
Name string
Description string
Inputs []*Input
Outputs []*Output
Resources *Resources
Executors []*Executor
Volumes []string
Tags map[string]string
BioosInfo *BioosInfo
PriorityValue int
}
Task ...
type TaskLog ¶
type TaskLog struct {
ClusterID string
Logs [][]*ExecutorLog
StartTime *time.Time
EndTime *time.Time
SystemLogs []string
}
TaskLog ...
type TaskStatus ¶
type TaskStatus struct {
ID string
State string
Logs []*TaskLog
CreationTime time.Time
ClusterID string
StatusResourceVersion int
}
TaskStatus contains fields not specified by CreateTask
func (*TaskStatus) UpdateClusterID ¶
func (t *TaskStatus) UpdateClusterID(clusterID string) error
UpdateClusterID ...
func (*TaskStatus) UpdateLogs ¶
func (t *TaskStatus) UpdateLogs(newLogs []*TaskLog) error
UpdateLogs ...
func (*TaskStatus) UpdateState ¶
func (t *TaskStatus) UpdateState(newState string) error
UpdateState ...