entity

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronTask

type CronTask struct {
	Uid              string
	TenantId         string
	Handler          string
	Name             string
	Description      string
	Cron             string
	Config           interface{}
	ScheduleStrategy string
	Priority         int32
	CreatedAt        time.Time
	UpdatedAt        time.Time
	NextTick         time.Time
	Status           enum.TaskStatus
}

CronTask defines the cron task

type CronTasks

type CronTasks []*CronTask

CronTasks is an array of CronTask

type DelayTask

type DelayTask struct {
	Uid              string
	TenantId         string
	Handler          string
	Config           interface{}
	ScheduleStrategy string
	Priority         int32
	CreatedAt        time.Time
	UpdatedAt        time.Time
	TimeToRun        time.Time
	Status           enum.TaskStatus
}

DelayTask defines the delay task

type DelayTasks

type DelayTasks []*DelayTask

DelayTasks is an array of DelayTask

type ResourceQuota

type ResourceQuota struct {
	Id          string
	TenantId    string
	Type        string
	CPU         sql.NullInt64
	Memory      sql.NullInt64
	Storage     sql.NullInt64
	GPU         sql.NullInt64
	Concurrency sql.NullInt64
	Custom      sql.NullInt64
	Peak        sql.NullFloat64
}

func NewResourceQuota added in v1.0.0

func NewResourceQuota(tid, typ string, val int64) ResourceQuota

func (*ResourceQuota) Fields

func (q *ResourceQuota) Fields() []interface{}

type TaskRun

type TaskRun struct {
	Id           string
	TenantId     string
	TaskId       string
	TaskType     string
	ScheduleType string
	Status       string
	Result       *string
	Error        *string
	Start        *time.Time
	End          *time.Time
}

type TaskRunLog

type TaskRunLog struct {
	Id  int64
	Log string
}

type TaskRunLogs

type TaskRunLogs []*TaskRunLog

type TaskRuns

type TaskRuns []*TaskRun

TaskRuns is an array of TaskRun

type Tasks

type Tasks struct {
	CronTasks  CronTasks
	UserTasks  UserTasks
	DelayTasks DelayTasks
}

type Tenant

type Tenant struct {
	Uid        string
	Zone       string
	Partition  string
	Priority   int32
	Name       string
	Status     string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	LastActive time.Time

	ResourceQuota ResourceQuota
}

Tenant defines the tenant

func (*Tenant) Fields

func (t *Tenant) Fields() []interface{}

func (*Tenant) FieldsWithQuota

func (t *Tenant) FieldsWithQuota() []interface{}

type Tenants

type Tenants []*Tenant

Tenants is an array of Tenant

type UserTask

type UserTask struct {
	Uid              string
	TenantId         string
	Handler          string
	Config           interface{}
	ScheduleStrategy string
	Priority         int32
	Progress         int32
	CreatedAt        time.Time
	UpdatedAt        time.Time
	Status           enum.TaskStatus
}

UserTask defines the user task

func (*UserTask) Fields

func (t *UserTask) Fields() []interface{}

type UserTasks

type UserTasks []*UserTask

UserTasks is an array of UserTask

func (UserTasks) TaskIds

func (ut UserTasks) TaskIds() []string

TaskIds returns task ids

Jump to

Keyboard shortcuts

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