task

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 11 Imported by: ? 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

View Source
var (
	ErrInvalidLengthTask        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTask          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTask = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ResultCode_name = map[int32]string{
	0: "Success",
	1: "Failed",
}
View Source
var ResultCode_value = map[string]int32{
	"Success": 0,
	"Failed":  1,
}
View Source
var TaskCode_name = map[int32]string{
	0: "TestOnly",
	1: "SystemInit",
	2: "MetricLogMerge",
	3: "MetricStorageUsage",
	4: "ConnectorKafkaSink",
	5: "MergeObject",
}
View Source
var TaskCode_value = map[string]int32{
	"TestOnly":           0,
	"SystemInit":         1,
	"MetricLogMerge":     2,
	"MetricStorageUsage": 3,
	"ConnectorKafkaSink": 4,
	"MergeObject":        5,
}
View Source
var TaskStatus_name = map[int32]string{
	0: "Created",
	1: "Running",
	2: "Completed",
	3: "Paused",
	4: "Error",
	5: "Canceled",
	6: "ResumeRequested",
	7: "PauseRequested",
	8: "CancelRequested",
}
View Source
var TaskStatus_value = map[string]int32{
	"Created":         0,
	"Running":         1,
	"Completed":       2,
	"Paused":          3,
	"Error":           4,
	"Canceled":        5,
	"ResumeRequested": 6,
	"PauseRequested":  7,
	"CancelRequested": 8,
}
View Source
var TaskType_name = map[int32]string{
	0: "Unknown",
	1: "KafkaSinkConnector",
}
View Source
var TaskType_value = map[string]int32{
	"Unknown":            0,
	"KafkaSinkConnector": 1,
}

Functions

This section is empty.

Types

type AsyncTask added in v1.1.0

type AsyncTask struct {
	ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// TaskMetadata task metadata
	Metadata TaskMetadata `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata"`
	// ParentTaskID used to record the parent task of the current task
	ParentTaskID string `protobuf:"bytes,3,opt,name=ParentTaskID,proto3" json:"ParentTaskID,omitempty"`
	// TaskStatus task status
	Status TaskStatus `protobuf:"varint,4,opt,name=Status,proto3,enum=task.TaskStatus" json:"Status,omitempty"`
	// TaskRunner is the UUID of the CN node which the task run is assigned to
	TaskRunner string `protobuf:"bytes,5,opt,name=TaskRunner,proto3" json:"TaskRunner,omitempty"`
	// Epoch indicates how many times the current task is scheduled, the first time it is scheduled
	// is 1. Each time it is scheduled, Epoch++.
	Epoch uint32 `protobuf:"varint,6,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
	// LastHeartbeat time of the last heartbeat reported by TaskRunner. Unix timestamp in ms
	LastHeartbeat int64 `protobuf:"varint,7,opt,name=LastHeartbeat,proto3" json:"LastHeartbeat,omitempty"`
	// CreateAt time of the task created. Unix timestamp in ms
	CreateAt int64 `protobuf:"varint,8,opt,name=CreateAt,proto3" json:"CreateAt,omitempty"`
	// CompletedAt time of the task completed. Unix timestamp in ms
	CompletedAt int64 `protobuf:"varint,9,opt,name=CompletedAt,proto3" json:"CompletedAt,omitempty"`
	// ExecuteResult execute result
	ExecuteResult        *ExecuteResult `protobuf:"bytes,10,opt,name=ExecuteResult,proto3" json:"ExecuteResult,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

Task task execute info.

func (AsyncTask) DebugString added in v1.1.0

func (m AsyncTask) DebugString() string

DebugString returns the debug string

func (*AsyncTask) Descriptor added in v1.1.0

func (*AsyncTask) Descriptor() ([]byte, []int)

func (*AsyncTask) GetCompletedAt added in v1.1.0

func (m *AsyncTask) GetCompletedAt() int64

func (*AsyncTask) GetCreateAt added in v1.1.0

func (m *AsyncTask) GetCreateAt() int64

func (AsyncTask) GetDelayDuration added in v1.1.0

func (m AsyncTask) GetDelayDuration() time.Duration

GetDelayDuration returns delay duration

func (*AsyncTask) GetEpoch added in v1.1.0

func (m *AsyncTask) GetEpoch() uint32

func (*AsyncTask) GetExecuteResult added in v1.1.0

func (m *AsyncTask) GetExecuteResult() *ExecuteResult

func (*AsyncTask) GetID added in v1.1.0

func (m *AsyncTask) GetID() uint64

func (*AsyncTask) GetLastHeartbeat added in v1.1.0

func (m *AsyncTask) GetLastHeartbeat() int64

func (*AsyncTask) GetMetadata added in v1.1.0

func (m *AsyncTask) GetMetadata() TaskMetadata

func (*AsyncTask) GetParentTaskID added in v1.1.0

func (m *AsyncTask) GetParentTaskID() string

func (*AsyncTask) GetStatus added in v1.1.0

func (m *AsyncTask) GetStatus() TaskStatus

func (*AsyncTask) GetTaskRunner added in v1.1.0

func (m *AsyncTask) GetTaskRunner() string

func (AsyncTask) IsDelayTask added in v1.1.0

func (m AsyncTask) IsDelayTask() bool

IsDelayTask returns true if the task is a delay task

func (*AsyncTask) Marshal added in v1.1.0

func (m *AsyncTask) Marshal() (dAtA []byte, err error)

func (*AsyncTask) MarshalTo added in v1.1.0

func (m *AsyncTask) MarshalTo(dAtA []byte) (int, error)

func (*AsyncTask) MarshalToSizedBuffer added in v1.1.0

func (m *AsyncTask) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AsyncTask) ProtoMessage added in v1.1.0

func (*AsyncTask) ProtoMessage()

func (*AsyncTask) Reset added in v1.1.0

func (m *AsyncTask) Reset()

func (*AsyncTask) Size added in v1.1.0

func (m *AsyncTask) Size() (n int)

func (*AsyncTask) String added in v1.1.0

func (m *AsyncTask) String() string

func (*AsyncTask) Unmarshal added in v1.1.0

func (m *AsyncTask) Unmarshal(dAtA []byte) error

func (*AsyncTask) XXX_DiscardUnknown added in v1.1.0

func (m *AsyncTask) XXX_DiscardUnknown()

func (*AsyncTask) XXX_Marshal added in v1.1.0

func (m *AsyncTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AsyncTask) XXX_Merge added in v1.1.0

func (m *AsyncTask) XXX_Merge(src proto.Message)

func (*AsyncTask) XXX_Size added in v1.1.0

func (m *AsyncTask) XXX_Size() int

func (*AsyncTask) XXX_Unmarshal added in v1.1.0

func (m *AsyncTask) XXX_Unmarshal(b []byte) error

type ConnectorDetails added in v1.1.0

type ConnectorDetails struct {
	TableName            string            `protobuf:"bytes,1,opt,name=TableName,proto3" json:"TableName,omitempty"`
	Options              map[string]string `` /* 155-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ConnectorDetails) Descriptor added in v1.1.0

func (*ConnectorDetails) Descriptor() ([]byte, []int)

func (*ConnectorDetails) GetOptions added in v1.1.0

func (m *ConnectorDetails) GetOptions() map[string]string

func (*ConnectorDetails) GetTableName added in v1.1.0

func (m *ConnectorDetails) GetTableName() string

func (*ConnectorDetails) Marshal added in v1.1.0

func (m *ConnectorDetails) Marshal() (dAtA []byte, err error)

func (*ConnectorDetails) MarshalTo added in v1.1.0

func (m *ConnectorDetails) MarshalTo(dAtA []byte) (int, error)

func (*ConnectorDetails) MarshalToSizedBuffer added in v1.1.0

func (m *ConnectorDetails) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnectorDetails) ProtoMessage added in v1.1.0

func (*ConnectorDetails) ProtoMessage()

func (*ConnectorDetails) Reset added in v1.1.0

func (m *ConnectorDetails) Reset()

func (*ConnectorDetails) Size added in v1.1.0

func (m *ConnectorDetails) Size() (n int)

func (*ConnectorDetails) String added in v1.1.0

func (m *ConnectorDetails) String() string

func (*ConnectorDetails) Unmarshal added in v1.1.0

func (m *ConnectorDetails) Unmarshal(dAtA []byte) error

func (*ConnectorDetails) XXX_DiscardUnknown added in v1.1.0

func (m *ConnectorDetails) XXX_DiscardUnknown()

func (*ConnectorDetails) XXX_Marshal added in v1.1.0

func (m *ConnectorDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnectorDetails) XXX_Merge added in v1.1.0

func (m *ConnectorDetails) XXX_Merge(src proto.Message)

func (*ConnectorDetails) XXX_Size added in v1.1.0

func (m *ConnectorDetails) XXX_Size() int

func (*ConnectorDetails) XXX_Unmarshal added in v1.1.0

func (m *ConnectorDetails) XXX_Unmarshal(b []byte) error

type CronTask

type CronTask struct {
	ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// TaskMetadata task metadata
	Metadata TaskMetadata `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata"`
	// CronExpr cron expr
	CronExpr string `protobuf:"bytes,3,opt,name=CronExpr,proto3" json:"CronExpr,omitempty"`
	// NextTime the next time it should be scheduled for execution. Unix timestamp in ms
	NextTime int64 `protobuf:"varint,4,opt,name=NextTime,proto3" json:"NextTime,omitempty"`
	// TriggerTimes the number of times it was triggered
	TriggerTimes uint64 `protobuf:"varint,5,opt,name=TriggerTimes,proto3" json:"TriggerTimes,omitempty"`
	// CreateAt time of the cron task created. Unix timestamp in ms
	CreateAt int64 `protobuf:"varint,6,opt,name=CreateAt,proto3" json:"CreateAt,omitempty"`
	// CreateAt time of the cron task created. Unix timestamp in ms
	UpdateAt             int64    `protobuf:"varint,7,opt,name=UpdateAt,proto3" json:"UpdateAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CronTask task execute info.

func (CronTask) DebugString

func (m CronTask) DebugString() string

DebugString returns the debug string

func (*CronTask) Descriptor

func (*CronTask) Descriptor() ([]byte, []int)

func (*CronTask) GetCreateAt

func (m *CronTask) GetCreateAt() int64

func (*CronTask) GetCronExpr

func (m *CronTask) GetCronExpr() string

func (*CronTask) GetID

func (m *CronTask) GetID() uint64

func (*CronTask) GetMetadata

func (m *CronTask) GetMetadata() TaskMetadata

func (*CronTask) GetNextTime

func (m *CronTask) GetNextTime() int64

func (*CronTask) GetTriggerTimes

func (m *CronTask) GetTriggerTimes() uint64

func (*CronTask) GetUpdateAt

func (m *CronTask) GetUpdateAt() int64

func (*CronTask) Marshal

func (m *CronTask) Marshal() (dAtA []byte, err error)

func (*CronTask) MarshalTo

func (m *CronTask) MarshalTo(dAtA []byte) (int, error)

func (*CronTask) MarshalToSizedBuffer

func (m *CronTask) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CronTask) ProtoMessage

func (*CronTask) ProtoMessage()

func (*CronTask) Reset

func (m *CronTask) Reset()

func (*CronTask) Size

func (m *CronTask) Size() (n int)

func (*CronTask) String

func (m *CronTask) String() string

func (*CronTask) Unmarshal

func (m *CronTask) Unmarshal(dAtA []byte) error

func (*CronTask) XXX_DiscardUnknown

func (m *CronTask) XXX_DiscardUnknown()

func (*CronTask) XXX_Marshal

func (m *CronTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CronTask) XXX_Merge

func (m *CronTask) XXX_Merge(src proto.Message)

func (*CronTask) XXX_Size

func (m *CronTask) XXX_Size() int

func (*CronTask) XXX_Unmarshal

func (m *CronTask) XXX_Unmarshal(b []byte) error

type DaemonTask added in v1.1.0

type DaemonTask struct {
	ID                   uint64       `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Metadata             TaskMetadata `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata"`
	AccountID            uint32       `protobuf:"varint,3,opt,name=AccountID,proto3" json:"AccountID,omitempty"`
	Account              string       `protobuf:"bytes,4,opt,name=Account,proto3" json:"Account,omitempty"`
	TaskType             TaskType     `protobuf:"varint,5,opt,name=TaskType,proto3,enum=task.TaskType" json:"TaskType,omitempty"`
	TaskRunner           string       `protobuf:"bytes,6,opt,name=TaskRunner,proto3" json:"TaskRunner,omitempty"`
	TaskStatus           TaskStatus   `protobuf:"varint,7,opt,name=TaskStatus,proto3,enum=task.TaskStatus" json:"TaskStatus,omitempty"`
	LastHeartbeat        time.Time    `protobuf:"bytes,8,opt,name=LastHeartbeat,proto3,stdtime" json:"LastHeartbeat"`
	Details              *Details     `protobuf:"bytes,9,opt,name=Details,proto3" json:"Details,omitempty"`
	CreateAt             time.Time    `protobuf:"bytes,10,opt,name=CreateAt,proto3,stdtime" json:"CreateAt"`
	UpdateAt             time.Time    `protobuf:"bytes,11,opt,name=UpdateAt,proto3,stdtime" json:"UpdateAt"`
	EndAt                time.Time    `protobuf:"bytes,12,opt,name=EndAt,proto3,stdtime" json:"EndAt"`
	LastRun              time.Time    `protobuf:"bytes,13,opt,name=LastRun,proto3,stdtime" json:"LastRun"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*DaemonTask) Descriptor added in v1.1.0

func (*DaemonTask) Descriptor() ([]byte, []int)

func (*DaemonTask) GetAccount added in v1.1.0

func (m *DaemonTask) GetAccount() string

func (*DaemonTask) GetAccountID added in v1.1.0

func (m *DaemonTask) GetAccountID() uint32

func (*DaemonTask) GetCreateAt added in v1.1.0

func (m *DaemonTask) GetCreateAt() time.Time

func (*DaemonTask) GetDetails added in v1.1.0

func (m *DaemonTask) GetDetails() *Details

func (*DaemonTask) GetEndAt added in v1.1.0

func (m *DaemonTask) GetEndAt() time.Time

func (*DaemonTask) GetID added in v1.1.0

func (m *DaemonTask) GetID() uint64

func (*DaemonTask) GetLastHeartbeat added in v1.1.0

func (m *DaemonTask) GetLastHeartbeat() time.Time

func (*DaemonTask) GetLastRun added in v1.1.0

func (m *DaemonTask) GetLastRun() time.Time

func (*DaemonTask) GetMetadata added in v1.1.0

func (m *DaemonTask) GetMetadata() TaskMetadata

func (*DaemonTask) GetTaskRunner added in v1.1.0

func (m *DaemonTask) GetTaskRunner() string

func (*DaemonTask) GetTaskStatus added in v1.1.0

func (m *DaemonTask) GetTaskStatus() TaskStatus

func (*DaemonTask) GetTaskType added in v1.1.0

func (m *DaemonTask) GetTaskType() TaskType

func (*DaemonTask) GetUpdateAt added in v1.1.0

func (m *DaemonTask) GetUpdateAt() time.Time

func (*DaemonTask) Marshal added in v1.1.0

func (m *DaemonTask) Marshal() (dAtA []byte, err error)

func (*DaemonTask) MarshalTo added in v1.1.0

func (m *DaemonTask) MarshalTo(dAtA []byte) (int, error)

func (*DaemonTask) MarshalToSizedBuffer added in v1.1.0

func (m *DaemonTask) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DaemonTask) ProtoMessage added in v1.1.0

func (*DaemonTask) ProtoMessage()

func (*DaemonTask) Reset added in v1.1.0

func (m *DaemonTask) Reset()

func (*DaemonTask) Size added in v1.1.0

func (m *DaemonTask) Size() (n int)

func (*DaemonTask) String added in v1.1.0

func (m *DaemonTask) String() string

func (*DaemonTask) Unmarshal added in v1.1.0

func (m *DaemonTask) Unmarshal(dAtA []byte) error

func (*DaemonTask) XXX_DiscardUnknown added in v1.1.0

func (m *DaemonTask) XXX_DiscardUnknown()

func (*DaemonTask) XXX_Marshal added in v1.1.0

func (m *DaemonTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DaemonTask) XXX_Merge added in v1.1.0

func (m *DaemonTask) XXX_Merge(src proto.Message)

func (*DaemonTask) XXX_Size added in v1.1.0

func (m *DaemonTask) XXX_Size() int

func (*DaemonTask) XXX_Unmarshal added in v1.1.0

func (m *DaemonTask) XXX_Unmarshal(b []byte) error

type Details added in v1.1.0

type Details struct {
	Description string `protobuf:"bytes,1,opt,name=Description,proto3" json:"Description,omitempty"`
	AccountID   uint32 `protobuf:"varint,2,opt,name=AccountID,proto3" json:"AccountID,omitempty"`
	Account     string `protobuf:"bytes,3,opt,name=Account,proto3" json:"Account,omitempty"`
	Username    string `protobuf:"bytes,4,opt,name=Username,proto3" json:"Username,omitempty"`
	Error       string `protobuf:"bytes,5,opt,name=Error,proto3" json:"Error,omitempty"`
	// Types that are valid to be assigned to Details:
	//
	//	*Details_Connector
	Details              isDetails_Details `protobuf_oneof:"Details"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Details) Descriptor added in v1.1.0

func (*Details) Descriptor() ([]byte, []int)

func (*Details) GetAccount added in v1.1.0

func (m *Details) GetAccount() string

func (*Details) GetAccountID added in v1.1.0

func (m *Details) GetAccountID() uint32

func (*Details) GetConnector added in v1.1.0

func (m *Details) GetConnector() *ConnectorDetails

func (*Details) GetDescription added in v1.1.0

func (m *Details) GetDescription() string

func (*Details) GetDetails added in v1.1.0

func (m *Details) GetDetails() isDetails_Details

func (*Details) GetError added in v1.1.0

func (m *Details) GetError() string

func (*Details) GetUsername added in v1.1.0

func (m *Details) GetUsername() string

func (*Details) Marshal added in v1.1.0

func (m *Details) Marshal() (dAtA []byte, err error)

func (*Details) MarshalTo added in v1.1.0

func (m *Details) MarshalTo(dAtA []byte) (int, error)

func (*Details) MarshalToSizedBuffer added in v1.1.0

func (m *Details) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Details) ProtoMessage added in v1.1.0

func (*Details) ProtoMessage()

func (*Details) Reset added in v1.1.0

func (m *Details) Reset()

func (*Details) Scan added in v1.1.0

func (t *Details) Scan(src any) error

func (*Details) Size added in v1.1.0

func (m *Details) Size() (n int)

func (*Details) String added in v1.1.0

func (m *Details) String() string

func (*Details) Type added in v1.1.0

func (t *Details) Type() TaskType

Type returns the task's type. It panics if the type is invalid.

func (*Details) Unmarshal added in v1.1.0

func (m *Details) Unmarshal(dAtA []byte) error

func (*Details) XXX_DiscardUnknown added in v1.1.0

func (m *Details) XXX_DiscardUnknown()

func (*Details) XXX_Marshal added in v1.1.0

func (m *Details) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Details) XXX_Merge added in v1.1.0

func (m *Details) XXX_Merge(src proto.Message)

func (*Details) XXX_OneofWrappers added in v1.1.0

func (*Details) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Details) XXX_Size added in v1.1.0

func (m *Details) XXX_Size() int

func (*Details) XXX_Unmarshal added in v1.1.0

func (m *Details) XXX_Unmarshal(b []byte) error

type Details_Connector added in v1.1.0

type Details_Connector struct {
	Connector *ConnectorDetails `protobuf:"bytes,10,opt,name=Connector,proto3,oneof" json:"Connector,omitempty"`
}

func (*Details_Connector) MarshalTo added in v1.1.0

func (m *Details_Connector) MarshalTo(dAtA []byte) (int, error)

func (*Details_Connector) MarshalToSizedBuffer added in v1.1.0

func (m *Details_Connector) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Details_Connector) Size added in v1.1.0

func (m *Details_Connector) Size() (n int)

type ExecuteResult

type ExecuteResult struct {
	// Code result code
	Code ResultCode `protobuf:"varint,1,opt,name=Code,proto3,enum=task.ResultCode" json:"Code,omitempty"`
	// Error error message
	Error                string   `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ExecuteResult task execute result

func (*ExecuteResult) Descriptor

func (*ExecuteResult) Descriptor() ([]byte, []int)

func (*ExecuteResult) GetCode

func (m *ExecuteResult) GetCode() ResultCode

func (*ExecuteResult) GetError

func (m *ExecuteResult) GetError() string

func (*ExecuteResult) Marshal

func (m *ExecuteResult) Marshal() (dAtA []byte, err error)

func (*ExecuteResult) MarshalTo

func (m *ExecuteResult) MarshalTo(dAtA []byte) (int, error)

func (*ExecuteResult) MarshalToSizedBuffer

func (m *ExecuteResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecuteResult) ProtoMessage

func (*ExecuteResult) ProtoMessage()

func (*ExecuteResult) Reset

func (m *ExecuteResult) Reset()

func (*ExecuteResult) Size

func (m *ExecuteResult) Size() (n int)

func (*ExecuteResult) String

func (m *ExecuteResult) String() string

func (*ExecuteResult) Unmarshal

func (m *ExecuteResult) Unmarshal(dAtA []byte) error

func (*ExecuteResult) XXX_DiscardUnknown

func (m *ExecuteResult) XXX_DiscardUnknown()

func (*ExecuteResult) XXX_Marshal

func (m *ExecuteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecuteResult) XXX_Merge

func (m *ExecuteResult) XXX_Merge(src proto.Message)

func (*ExecuteResult) XXX_Size

func (m *ExecuteResult) XXX_Size() int

func (*ExecuteResult) XXX_Unmarshal

func (m *ExecuteResult) XXX_Unmarshal(b []byte) error

type Resource added in v1.1.2

type Resource struct {
	// CPU cpu resource
	CPU uint64 `protobuf:"varint,1,opt,name=CPU,proto3" json:"CPU,omitempty"`
	// Memory memory resource
	Memory               uint64   `protobuf:"varint,2,opt,name=Memory,proto3" json:"Memory,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Resource task resource

func (*Resource) Descriptor added in v1.1.2

func (*Resource) Descriptor() ([]byte, []int)

func (*Resource) GetCPU added in v1.1.2

func (m *Resource) GetCPU() uint64

func (*Resource) GetMemory added in v1.1.2

func (m *Resource) GetMemory() uint64

func (*Resource) Marshal added in v1.1.2

func (m *Resource) Marshal() (dAtA []byte, err error)

func (*Resource) MarshalTo added in v1.1.2

func (m *Resource) MarshalTo(dAtA []byte) (int, error)

func (*Resource) MarshalToSizedBuffer added in v1.1.2

func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Resource) ProtoMessage added in v1.1.2

func (*Resource) ProtoMessage()

func (*Resource) Reset added in v1.1.2

func (m *Resource) Reset()

func (*Resource) Size added in v1.1.2

func (m *Resource) Size() (n int)

func (*Resource) String added in v1.1.2

func (m *Resource) String() string

func (*Resource) Unmarshal added in v1.1.2

func (m *Resource) Unmarshal(dAtA []byte) error

func (*Resource) XXX_DiscardUnknown added in v1.1.2

func (m *Resource) XXX_DiscardUnknown()

func (*Resource) XXX_Marshal added in v1.1.2

func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Resource) XXX_Merge added in v1.1.2

func (m *Resource) XXX_Merge(src proto.Message)

func (*Resource) XXX_Size added in v1.1.2

func (m *Resource) XXX_Size() int

func (*Resource) XXX_Unmarshal added in v1.1.2

func (m *Resource) XXX_Unmarshal(b []byte) error

type ResultCode

type ResultCode int32

ResultCode result code

const (
	// Success success
	ResultCode_Success ResultCode = 0
	// Failed failed
	ResultCode_Failed ResultCode = 1
)

func (ResultCode) EnumDescriptor

func (ResultCode) EnumDescriptor() ([]byte, []int)

func (ResultCode) String

func (x ResultCode) String() string

type Task

type Task interface {
	GetID() uint64
	GetMetadata() TaskMetadata
}

type TaskCode

type TaskCode int32

TaskCode task code

const (
	// TestOnly reserved for testing.
	TaskCode_TestOnly TaskCode = 0
	// SystemInit system init task
	TaskCode_SystemInit TaskCode = 1
	// MetricLogMerge handle metric/log exported data merge task
	TaskCode_MetricLogMerge TaskCode = 2
	// MetricStorageUsage handle metric server_storage_usage collection
	TaskCode_MetricStorageUsage TaskCode = 3
	// ConnectorKafkaSink is for the streaming connector task.
	TaskCode_ConnectorKafkaSink TaskCode = 4
	// MergeObject is for the merge object task.
	TaskCode_MergeObject TaskCode = 5
)

func (TaskCode) EnumDescriptor

func (TaskCode) EnumDescriptor() ([]byte, []int)

func (TaskCode) String

func (x TaskCode) String() string

type TaskMetadata

type TaskMetadata struct {
	// ID task id, global unique
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	// Executor used to select a particular task executor to run a task
	Executor TaskCode `protobuf:"varint,2,opt,name=Executor,proto3,enum=task.TaskCode" json:"Executor,omitempty"`
	// Context context needed to run the task
	Context []byte `protobuf:"bytes,3,opt,name=Context,proto3" json:"Context,omitempty"`
	// Options options for execute task
	Options              TaskOptions `protobuf:"bytes,4,opt,name=Options,proto3" json:"Options"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

TaskMetadata is a task metadata abstraction that can be scheduled for execution at any CN node.

func (*TaskMetadata) Descriptor

func (*TaskMetadata) Descriptor() ([]byte, []int)

func (*TaskMetadata) GetContext

func (m *TaskMetadata) GetContext() []byte

func (*TaskMetadata) GetExecutor

func (m *TaskMetadata) GetExecutor() TaskCode

func (*TaskMetadata) GetID

func (m *TaskMetadata) GetID() string

func (*TaskMetadata) GetOptions

func (m *TaskMetadata) GetOptions() TaskOptions

func (*TaskMetadata) Marshal

func (m *TaskMetadata) Marshal() (dAtA []byte, err error)

func (*TaskMetadata) MarshalTo

func (m *TaskMetadata) MarshalTo(dAtA []byte) (int, error)

func (*TaskMetadata) MarshalToSizedBuffer

func (m *TaskMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TaskMetadata) ProtoMessage

func (*TaskMetadata) ProtoMessage()

func (*TaskMetadata) Reset

func (m *TaskMetadata) Reset()

func (*TaskMetadata) Size

func (m *TaskMetadata) Size() (n int)

func (*TaskMetadata) String

func (m *TaskMetadata) String() string

func (*TaskMetadata) Unmarshal

func (m *TaskMetadata) Unmarshal(dAtA []byte) error

func (*TaskMetadata) XXX_DiscardUnknown

func (m *TaskMetadata) XXX_DiscardUnknown()

func (*TaskMetadata) XXX_Marshal

func (m *TaskMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TaskMetadata) XXX_Merge

func (m *TaskMetadata) XXX_Merge(src proto.Message)

func (*TaskMetadata) XXX_Size

func (m *TaskMetadata) XXX_Size() int

func (*TaskMetadata) XXX_Unmarshal

func (m *TaskMetadata) XXX_Unmarshal(b []byte) error

type TaskOptions

type TaskOptions struct {
	// MaxRetryTimes 0 means disable retry
	MaxRetryTimes uint32 `protobuf:"varint,1,opt,name=MaxRetryTimes,proto3" json:"MaxRetryTimes,omitempty"`
	// RetryInterval retry interval
	RetryInterval int64 `protobuf:"varint,2,opt,name=RetryInterval,proto3" json:"RetryInterval,omitempty"`
	// DelayDuration delay duration. Controls how long a task is delayed before it is scheduled for
	// execution.
	DelayDuration int64 `protobuf:"varint,3,opt,name=DelayDuration,proto3" json:"DelayDuration,omitempty"`
	// Concurrency is the max number of a task running at the same time. 0 means no limits.
	Concurrency uint32 `protobuf:"varint,4,opt,name=Concurrency,proto3" json:"Concurrency,omitempty"`
	// Labels indicates that the task should run on the CNs with the Labels.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Resource required by the task
	Resource             *Resource `protobuf:"bytes,6,opt,name=Resource,proto3" json:"Resource,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

TaskOptions task options

func (*TaskOptions) Descriptor

func (*TaskOptions) Descriptor() ([]byte, []int)

func (*TaskOptions) GetConcurrency added in v0.7.0

func (m *TaskOptions) GetConcurrency() uint32

func (*TaskOptions) GetDelayDuration

func (m *TaskOptions) GetDelayDuration() int64

func (*TaskOptions) GetLabels added in v1.1.2

func (m *TaskOptions) GetLabels() map[string]string

func (*TaskOptions) GetMaxRetryTimes

func (m *TaskOptions) GetMaxRetryTimes() uint32

func (*TaskOptions) GetResource added in v1.1.2

func (m *TaskOptions) GetResource() *Resource

func (*TaskOptions) GetRetryInterval

func (m *TaskOptions) GetRetryInterval() int64

func (*TaskOptions) Marshal

func (m *TaskOptions) Marshal() (dAtA []byte, err error)

func (*TaskOptions) MarshalTo

func (m *TaskOptions) MarshalTo(dAtA []byte) (int, error)

func (*TaskOptions) MarshalToSizedBuffer

func (m *TaskOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TaskOptions) ProtoMessage

func (*TaskOptions) ProtoMessage()

func (*TaskOptions) Reset

func (m *TaskOptions) Reset()

func (*TaskOptions) Size

func (m *TaskOptions) Size() (n int)

func (*TaskOptions) String

func (m *TaskOptions) String() string

func (*TaskOptions) Unmarshal

func (m *TaskOptions) Unmarshal(dAtA []byte) error

func (*TaskOptions) XXX_DiscardUnknown

func (m *TaskOptions) XXX_DiscardUnknown()

func (*TaskOptions) XXX_Marshal

func (m *TaskOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TaskOptions) XXX_Merge

func (m *TaskOptions) XXX_Merge(src proto.Message)

func (*TaskOptions) XXX_Size

func (m *TaskOptions) XXX_Size() int

func (*TaskOptions) XXX_Unmarshal

func (m *TaskOptions) XXX_Unmarshal(b []byte) error

type TaskStatus

type TaskStatus int32

TaskStatus task status

const (
	// Create is the state of waiting to be scheduled.
	TaskStatus_Created TaskStatus = 0
	// Running is running state. Task is assigned to a CN node and is running
	TaskStatus_Running TaskStatus = 1
	// Completed the task has been completed.
	TaskStatus_Completed TaskStatus = 2
	// Paused is the state that the task has been paused by user.
	TaskStatus_Paused TaskStatus = 3
	// Error is the state that the task encounters some kind of error.
	TaskStatus_Error TaskStatus = 4
	// Canceled is the state that the task is canceled by user.
	TaskStatus_Canceled TaskStatus = 5
	// ResumeRequested is the state that resume request has been proposed to
	// the task and has not been resume.
	TaskStatus_ResumeRequested TaskStatus = 6
	// PauseRequested is the state that pause request has been proposed to
	// the task and has not been paused.
	TaskStatus_PauseRequested TaskStatus = 7
	// CancelRequested is the state that cancel request has been proposed to
	// the task and has not been canceled.
	TaskStatus_CancelRequested TaskStatus = 8
)

func (TaskStatus) EnumDescriptor

func (TaskStatus) EnumDescriptor() ([]byte, []int)

func (TaskStatus) String

func (x TaskStatus) String() string

type TaskType added in v1.1.0

type TaskType int32
const (
	TaskType_TypeUnknown            TaskType = 0
	TaskType_TypeKafkaSinkConnector TaskType = 1
)

func (TaskType) EnumDescriptor added in v1.1.0

func (TaskType) EnumDescriptor() ([]byte, []int)

func (TaskType) String added in v1.1.0

func (x TaskType) String() string

Jump to

Keyboard shortcuts

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