Documentation
¶
Index ¶
- type ResourceQuota
- func (q *ResourceQuota) CPUEnabled() bool
- func (q *ResourceQuota) ConcurrencyEnabled() bool
- func (q *ResourceQuota) CustomEnabled() bool
- func (q *ResourceQuota) Fields() []interface{}
- func (q *ResourceQuota) GPUEnabled() bool
- func (q *ResourceQuota) MemoryEnabled() bool
- func (q *ResourceQuota) PeakEnabled() bool
- func (q *ResourceQuota) StorageEnabled() bool
- type Task
- type TaskRun
- type TaskRunLog
- type TaskRunLogs
- type TaskRuns
- type Tasks
- type Tenant
- type Tenants
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceQuota ¶
type ResourceQuota struct { TenantId string `json:"tenantId" bson:"tenantId"` Concurrency int64 `json:"concurrency" bson:"concurrency"` // Task concurrency quota CPU int64 `json:"cpu" bson:"cpu"` // CPU quota in cores Custom int64 `json:"custom" bson:"custom"` // Custom resource quota GPU int64 `json:"gpu" bson:"gpu"` // GPU quota in cores Memory int64 `json:"memory" bson:"memory"` // Memory quota in MB Storage int64 `json:"storage" bson:"storage"` // Storage quota in MB Peak float32 `json:"peak" bson:"peak"` // Actual or realtime resource usage can exceed quota in percent. Ranged from 0 to 1.0 (or higher) }
ResourceQuota tenant resource quota options. Resource quotas are optional, 0 means there is no limit for specified resource type
func (*ResourceQuota) CPUEnabled ¶
func (q *ResourceQuota) CPUEnabled() bool
func (*ResourceQuota) ConcurrencyEnabled ¶
func (q *ResourceQuota) ConcurrencyEnabled() bool
func (*ResourceQuota) CustomEnabled ¶
func (q *ResourceQuota) CustomEnabled() bool
func (*ResourceQuota) Fields ¶
func (q *ResourceQuota) Fields() []interface{}
func (*ResourceQuota) GPUEnabled ¶
func (q *ResourceQuota) GPUEnabled() bool
func (*ResourceQuota) MemoryEnabled ¶
func (q *ResourceQuota) MemoryEnabled() bool
func (*ResourceQuota) PeakEnabled ¶
func (q *ResourceQuota) PeakEnabled() bool
func (*ResourceQuota) StorageEnabled ¶
func (q *ResourceQuota) StorageEnabled() bool
type Task ¶ added in v0.1.6
type Task struct { Uid string `json:"uid" bson:"uid"` TenantId string `json:"tenantId" bson:"tenantId"` Handler string `json:"handler" bson:"handler"` Config string `json:"config" bson:"config"` ScheduleStrategy string `json:"scheduleStrategy" bson:"scheduleStrategy"` Priority int32 `json:"priority" bson:"priority"` Progress int32 `json:"progress" bson:"progress"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` Status enum.TaskStatus `json:"status" bson:"status"` }
Task defines the user task
type TaskRun ¶
type TaskRun struct { Id string `json:"id" bson:"_id"` TenantId string `json:"tenantId" bson:"tenantId"` TaskId string `json:"taskId" bson:"taskId"` TaskType string `json:"taskType" bson:"taskType"` ScheduleType string `json:"scheduleType" bson:"scheduleType"` Status string `json:"status" bson:"status"` Result *string `json:"result" bson:"result"` Error *string `json:"error" bson:"error"` Start *time.Time `json:"start" bson:"start"` End *time.Time `json:"end" bson:"end"` }
type TaskRunLog ¶
type TaskRunLogs ¶
type TaskRunLogs []*TaskRunLog
type Tenant ¶
type Tenant struct { Uid string `json:"uid" bson:"uid"` Zone string `json:"zone" bson:"zone"` Partition string `json:"partition" bson:"partition"` Priority int32 `json:"priority" bson:"priority"` Name string `json:"name" bson:"name"` Status string `json:"status" bson:"status"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` LastActive time.Time `json:"lastActive" bson:"lastActive"` ResourceQuota ResourceQuota `bson:"-" json:"resourceQuota"` }
Tenant defines the tenant
func (*Tenant) FieldsWithQuota ¶
func (t *Tenant) FieldsWithQuota() []interface{}
Click to show internal directories.
Click to hide internal directories.