executorv1

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExecutorService_Execute_FullMethodName   = "/etask.executor.v1.ExecutorService/Execute"
	ExecutorService_Interrupt_FullMethodName = "/etask.executor.v1.ExecutorService/Interrupt"
	ExecutorService_Query_FullMethodName     = "/etask.executor.v1.ExecutorService/Query"
	ExecutorService_Prepare_FullMethodName   = "/etask.executor.v1.ExecutorService/Prepare"
)
View Source
const (
	TaskExecutionService_ListTaskExecutions_FullMethodName      = "/etask.executor.v1.TaskExecutionService/ListTaskExecutions"
	TaskExecutionService_GetExecutionLogs_FullMethodName        = "/etask.executor.v1.TaskExecutionService/GetExecutionLogs"
	TaskExecutionService_BatchListTaskExecutions_FullMethodName = "/etask.executor.v1.TaskExecutionService/BatchListTaskExecutions"
)
View Source
const (
	AgentService_PullTask_FullMethodName = "/etask.executor.v1.AgentService/PullTask"
)

Variables

View Source
var (
	ExecutionStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "RUNNING",
		2: "FAILED_RETRYABLE",
		3: "FAILED_RESCHEDULABLE",
		4: "FAILED",
		5: "SUCCESS",
	}
	ExecutionStatus_value = map[string]int32{
		"UNKNOWN":              0,
		"RUNNING":              1,
		"FAILED_RETRYABLE":     2,
		"FAILED_RESCHEDULABLE": 3,
		"FAILED":               4,
		"SUCCESS":              5,
	}
)

Enum value maps for ExecutionStatus.

View Source
var AgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "etask.executor.v1.AgentService",
	HandlerType: (*AgentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PullTask",
			Handler:    _AgentService_PullTask_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "etask/executor/v1/executor.proto",
}

AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var ExecutorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "etask.executor.v1.ExecutorService",
	HandlerType: (*ExecutorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Execute",
			Handler:    _ExecutorService_Execute_Handler,
		},
		{
			MethodName: "Interrupt",
			Handler:    _ExecutorService_Interrupt_Handler,
		},
		{
			MethodName: "Query",
			Handler:    _ExecutorService_Query_Handler,
		},
		{
			MethodName: "Prepare",
			Handler:    _ExecutorService_Prepare_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "etask/executor/v1/executor.proto",
}

ExecutorService_ServiceDesc is the grpc.ServiceDesc for ExecutorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_etask_executor_v1_executor_proto protoreflect.FileDescriptor
View Source
var TaskExecutionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "etask.executor.v1.TaskExecutionService",
	HandlerType: (*TaskExecutionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListTaskExecutions",
			Handler:    _TaskExecutionService_ListTaskExecutions_Handler,
		},
		{
			MethodName: "GetExecutionLogs",
			Handler:    _TaskExecutionService_GetExecutionLogs_Handler,
		},
		{
			MethodName: "BatchListTaskExecutions",
			Handler:    _TaskExecutionService_BatchListTaskExecutions_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "etask/executor/v1/executor.proto",
}

TaskExecutionService_ServiceDesc is the grpc.ServiceDesc for TaskExecutionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterAgentServiceServer

func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)

func RegisterExecutorServiceServer

func RegisterExecutorServiceServer(s grpc.ServiceRegistrar, srv ExecutorServiceServer)

func RegisterTaskExecutionServiceServer

func RegisterTaskExecutionServiceServer(s grpc.ServiceRegistrar, srv TaskExecutionServiceServer)

Types

type AgentServiceClient

type AgentServiceClient interface {
	PullTask(ctx context.Context, in *PullTaskRequest, opts ...grpc.CallOption) (*PullTaskResponse, error)
}

AgentServiceClient is the client API for AgentService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

AgentService 专门供边缘执行节点回调和拉取的拉取接口(只应跑在调度中心)

type AgentServiceServer

type AgentServiceServer interface {
	PullTask(context.Context, *PullTaskRequest) (*PullTaskResponse, error)
	// contains filtered or unexported methods
}

AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility.

AgentService 专门供边缘执行节点回调和拉取的拉取接口(只应跑在调度中心)

type BatchListTaskExecutionsRequest

type BatchListTaskExecutionsRequest struct {
	TaskIds []int64 `protobuf:"varint,1,rep,packed,name=task_ids,json=taskIds,proto3" json:"task_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*BatchListTaskExecutionsRequest) Descriptor deprecated

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

Deprecated: Use BatchListTaskExecutionsRequest.ProtoReflect.Descriptor instead.

func (*BatchListTaskExecutionsRequest) GetTaskIds

func (x *BatchListTaskExecutionsRequest) GetTaskIds() []int64

func (*BatchListTaskExecutionsRequest) ProtoMessage

func (*BatchListTaskExecutionsRequest) ProtoMessage()

func (*BatchListTaskExecutionsRequest) ProtoReflect

func (*BatchListTaskExecutionsRequest) Reset

func (x *BatchListTaskExecutionsRequest) Reset()

func (*BatchListTaskExecutionsRequest) String

type BatchListTaskExecutionsResponse

type BatchListTaskExecutionsResponse struct {
	Results map[int64]*TaskExecutionList `` // key is task_id
	/* 142-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BatchListTaskExecutionsResponse) Descriptor deprecated

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

Deprecated: Use BatchListTaskExecutionsResponse.ProtoReflect.Descriptor instead.

func (*BatchListTaskExecutionsResponse) GetResults

func (*BatchListTaskExecutionsResponse) ProtoMessage

func (*BatchListTaskExecutionsResponse) ProtoMessage()

func (*BatchListTaskExecutionsResponse) ProtoReflect

func (*BatchListTaskExecutionsResponse) Reset

func (*BatchListTaskExecutionsResponse) String

type ExecuteRequest

type ExecuteRequest struct {
	Eid             int64  `protobuf:"varint,1,opt,name=eid,proto3" json:"eid,omitempty"` // execution id
	TaskId          int64  `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	TaskName        string `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`
	TaskHandlerName string `protobuf:"bytes,4,opt,name=task_handler_name,json=taskHandlerName,proto3" json:"task_handler_name,omitempty"`
	// 这里有两部分
	// 1 一部分是通过管理后台,业务方自己搞的参数
	// 2. 另外一部分是我们调度用的,比如说 offset, limit
	// 即包含了业务参数和调度参数 (e.g., offset, limit)
	Params map[string]string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ExecuteRequest) Descriptor deprecated

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

Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.

func (*ExecuteRequest) GetEid

func (x *ExecuteRequest) GetEid() int64

func (*ExecuteRequest) GetParams

func (x *ExecuteRequest) GetParams() map[string]string

func (*ExecuteRequest) GetTaskHandlerName

func (x *ExecuteRequest) GetTaskHandlerName() string

func (*ExecuteRequest) GetTaskId

func (x *ExecuteRequest) GetTaskId() int64

func (*ExecuteRequest) GetTaskName

func (x *ExecuteRequest) GetTaskName() string

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) ProtoReflect

func (x *ExecuteRequest) ProtoReflect() protoreflect.Message

func (*ExecuteRequest) Reset

func (x *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (x *ExecuteRequest) String() string

type ExecuteResponse

type ExecuteResponse struct {
	ExecutionState *ExecutionState `protobuf:"bytes,1,opt,name=execution_state,json=executionState,proto3" json:"execution_state,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecuteResponse) Descriptor deprecated

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

Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.

func (*ExecuteResponse) GetExecutionState

func (x *ExecuteResponse) GetExecutionState() *ExecutionState

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) ProtoReflect

func (x *ExecuteResponse) ProtoReflect() protoreflect.Message

func (*ExecuteResponse) Reset

func (x *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (x *ExecuteResponse) String() string

type ExecutionLog

type ExecutionLog struct {
	Id      int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Time    int64  `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecutionLog) Descriptor deprecated

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

Deprecated: Use ExecutionLog.ProtoReflect.Descriptor instead.

func (*ExecutionLog) GetContent

func (x *ExecutionLog) GetContent() string

func (*ExecutionLog) GetId

func (x *ExecutionLog) GetId() int64

func (*ExecutionLog) GetTime

func (x *ExecutionLog) GetTime() int64

func (*ExecutionLog) ProtoMessage

func (*ExecutionLog) ProtoMessage()

func (*ExecutionLog) ProtoReflect

func (x *ExecutionLog) ProtoReflect() protoreflect.Message

func (*ExecutionLog) Reset

func (x *ExecutionLog) Reset()

func (*ExecutionLog) String

func (x *ExecutionLog) String() string

type ExecutionState

type ExecutionState struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	TaskId   int64  `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	TaskName string `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`
	// 中断时刻执行节点的执行进度
	Status ExecutionStatus `protobuf:"varint,4,opt,name=status,proto3,enum=etask.executor.v1.ExecutionStatus" json:"status,omitempty"` // RUNNING,FAILED_RETRYABLE,FAILED,SUCCESS
	// 0-100 的数字。代表进度
	// RUNNING 状态才有意义
	RunningProgress int32 `protobuf:"varint,5,opt,name=running_progress,json=runningProgress,proto3" json:"running_progress,omitempty"`
	// 执行节点请求调度节点执行重调度,
	// 调度节点无需调interrupt,调度节点可以直接重调度,因为此时执行节点必然已经停止了
	RequestReschedule bool `protobuf:"varint,6,opt,name=request_reschedule,json=requestReschedule,proto3" json:"request_reschedule,omitempty"`
	// 重调度(执行节点主动提出)或者中断后的恢复参数(调度节点主动要求)
	// 用于重调度或中断恢复重新调度的参数
	// 比如:调用 A 节点上,中断任务
	// A 节点返回 offset = 10000, limit = 100
	// 你后续重调度到 B 节点上,
	// 传递给 B 节点的 ExecuteRequest 的 params 里面就包含 offset, limit
	RescheduledParams map[string]string `` /* 186-byte string literal not displayed */
	// 执行节点的 nodeID,用于记录是哪个节点处理了任务
	ExecutorNodeId string `protobuf:"bytes,8,opt,name=executor_node_id,json=executorNodeId,proto3" json:"executor_node_id,omitempty"`
	// 任务执行的结构化结果(JSON 格式字符串)
	// 通过 FD3 或 want_result 函数返回的结构化数据
	TaskResult string `protobuf:"bytes,9,opt,name=task_result,json=taskResult,proto3" json:"task_result,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecutionState) Descriptor deprecated

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

Deprecated: Use ExecutionState.ProtoReflect.Descriptor instead.

func (*ExecutionState) GetExecutorNodeId

func (x *ExecutionState) GetExecutorNodeId() string

func (*ExecutionState) GetId

func (x *ExecutionState) GetId() int64

func (*ExecutionState) GetRequestReschedule

func (x *ExecutionState) GetRequestReschedule() bool

func (*ExecutionState) GetRescheduledParams

func (x *ExecutionState) GetRescheduledParams() map[string]string

func (*ExecutionState) GetRunningProgress

func (x *ExecutionState) GetRunningProgress() int32

func (*ExecutionState) GetStatus

func (x *ExecutionState) GetStatus() ExecutionStatus

func (*ExecutionState) GetTaskId

func (x *ExecutionState) GetTaskId() int64

func (*ExecutionState) GetTaskName

func (x *ExecutionState) GetTaskName() string

func (*ExecutionState) GetTaskResult

func (x *ExecutionState) GetTaskResult() string

func (*ExecutionState) ProtoMessage

func (*ExecutionState) ProtoMessage()

func (*ExecutionState) ProtoReflect

func (x *ExecutionState) ProtoReflect() protoreflect.Message

func (*ExecutionState) Reset

func (x *ExecutionState) Reset()

func (*ExecutionState) String

func (x *ExecutionState) String() string

type ExecutionStatus

type ExecutionStatus int32
const (
	ExecutionStatus_UNKNOWN              ExecutionStatus = 0 // 未知状态
	ExecutionStatus_RUNNING              ExecutionStatus = 1 // 正在执行
	ExecutionStatus_FAILED_RETRYABLE     ExecutionStatus = 2 // 可重试失败
	ExecutionStatus_FAILED_RESCHEDULABLE ExecutionStatus = 3 // 可重调度失败
	ExecutionStatus_FAILED               ExecutionStatus = 4 // 不可重试失败
	ExecutionStatus_SUCCESS              ExecutionStatus = 5 // 执行成功
)

func (ExecutionStatus) Descriptor

func (ExecutionStatus) Enum

func (x ExecutionStatus) Enum() *ExecutionStatus

func (ExecutionStatus) EnumDescriptor deprecated

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

Deprecated: Use ExecutionStatus.Descriptor instead.

func (ExecutionStatus) Number

func (ExecutionStatus) String

func (x ExecutionStatus) String() string

func (ExecutionStatus) Type

type ExecutorServiceClient

type ExecutorServiceClient interface {
	// 执行一个任务
	Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
	// 中断一个正在执行的任务
	Interrupt(ctx context.Context, in *InterruptRequest, opts ...grpc.CallOption) (*InterruptResponse, error)
	// 查询一个任务的状态(用于轮询模式)
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
	// 查询业务方任务总数量
	Prepare(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*PrepareResponse, error)
}

ExecutorServiceClient is the client API for ExecutorService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

ExecutorService 执行节点需要实现的接口,以便调度节点可以通知执行节点执行任务、中断任务及查询任务执行状态。

type ExecutorServiceServer

type ExecutorServiceServer interface {
	// 执行一个任务
	Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
	// 中断一个正在执行的任务
	Interrupt(context.Context, *InterruptRequest) (*InterruptResponse, error)
	// 查询一个任务的状态(用于轮询模式)
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
	// 查询业务方任务总数量
	Prepare(context.Context, *PrepareRequest) (*PrepareResponse, error)
	// contains filtered or unexported methods
}

ExecutorServiceServer is the server API for ExecutorService service. All implementations must embed UnimplementedExecutorServiceServer for forward compatibility.

ExecutorService 执行节点需要实现的接口,以便调度节点可以通知执行节点执行任务、中断任务及查询任务执行状态。

type GetExecutionLogsRequest

type GetExecutionLogsRequest struct {
	ExecutionId int64 `protobuf:"varint,1,opt,name=execution_id,json=executionId,proto3" json:"execution_id,omitempty"`
	MinId       int64 `protobuf:"varint,2,opt,name=min_id,json=minId,proto3" json:"min_id,omitempty"`
	Limit       int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*GetExecutionLogsRequest) Descriptor deprecated

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

Deprecated: Use GetExecutionLogsRequest.ProtoReflect.Descriptor instead.

func (*GetExecutionLogsRequest) GetExecutionId

func (x *GetExecutionLogsRequest) GetExecutionId() int64

func (*GetExecutionLogsRequest) GetLimit

func (x *GetExecutionLogsRequest) GetLimit() int32

func (*GetExecutionLogsRequest) GetMinId

func (x *GetExecutionLogsRequest) GetMinId() int64

func (*GetExecutionLogsRequest) ProtoMessage

func (*GetExecutionLogsRequest) ProtoMessage()

func (*GetExecutionLogsRequest) ProtoReflect

func (x *GetExecutionLogsRequest) ProtoReflect() protoreflect.Message

func (*GetExecutionLogsRequest) Reset

func (x *GetExecutionLogsRequest) Reset()

func (*GetExecutionLogsRequest) String

func (x *GetExecutionLogsRequest) String() string

type GetExecutionLogsResponse

type GetExecutionLogsResponse struct {
	Logs  []*ExecutionLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
	MaxId int64           `protobuf:"varint,2,opt,name=max_id,json=maxId,proto3" json:"max_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetExecutionLogsResponse) Descriptor deprecated

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

Deprecated: Use GetExecutionLogsResponse.ProtoReflect.Descriptor instead.

func (*GetExecutionLogsResponse) GetLogs

func (x *GetExecutionLogsResponse) GetLogs() []*ExecutionLog

func (*GetExecutionLogsResponse) GetMaxId

func (x *GetExecutionLogsResponse) GetMaxId() int64

func (*GetExecutionLogsResponse) ProtoMessage

func (*GetExecutionLogsResponse) ProtoMessage()

func (*GetExecutionLogsResponse) ProtoReflect

func (x *GetExecutionLogsResponse) ProtoReflect() protoreflect.Message

func (*GetExecutionLogsResponse) Reset

func (x *GetExecutionLogsResponse) Reset()

func (*GetExecutionLogsResponse) String

func (x *GetExecutionLogsResponse) String() string

type InterruptRequest

type InterruptRequest struct {
	Eid int64 `protobuf:"varint,1,opt,name=eid,proto3" json:"eid,omitempty"`
	// contains filtered or unexported fields
}

func (*InterruptRequest) Descriptor deprecated

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

Deprecated: Use InterruptRequest.ProtoReflect.Descriptor instead.

func (*InterruptRequest) GetEid

func (x *InterruptRequest) GetEid() int64

func (*InterruptRequest) ProtoMessage

func (*InterruptRequest) ProtoMessage()

func (*InterruptRequest) ProtoReflect

func (x *InterruptRequest) ProtoReflect() protoreflect.Message

func (*InterruptRequest) Reset

func (x *InterruptRequest) Reset()

func (*InterruptRequest) String

func (x *InterruptRequest) String() string

type InterruptResponse

type InterruptResponse struct {
	Success        bool            `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 是否成功中断
	ExecutionState *ExecutionState `protobuf:"bytes,3,opt,name=execution_state,json=executionState,proto3" json:"execution_state,omitempty"`
	// contains filtered or unexported fields
}

func (*InterruptResponse) Descriptor deprecated

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

Deprecated: Use InterruptResponse.ProtoReflect.Descriptor instead.

func (*InterruptResponse) GetExecutionState

func (x *InterruptResponse) GetExecutionState() *ExecutionState

func (*InterruptResponse) GetSuccess

func (x *InterruptResponse) GetSuccess() bool

func (*InterruptResponse) ProtoMessage

func (*InterruptResponse) ProtoMessage()

func (*InterruptResponse) ProtoReflect

func (x *InterruptResponse) ProtoReflect() protoreflect.Message

func (*InterruptResponse) Reset

func (x *InterruptResponse) Reset()

func (*InterruptResponse) String

func (x *InterruptResponse) String() string

type ListTaskExecutionsRequest

type ListTaskExecutionsRequest struct {
	TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTaskExecutionsRequest) Descriptor deprecated

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

Deprecated: Use ListTaskExecutionsRequest.ProtoReflect.Descriptor instead.

func (*ListTaskExecutionsRequest) GetTaskId

func (x *ListTaskExecutionsRequest) GetTaskId() int64

func (*ListTaskExecutionsRequest) ProtoMessage

func (*ListTaskExecutionsRequest) ProtoMessage()

func (*ListTaskExecutionsRequest) ProtoReflect

func (*ListTaskExecutionsRequest) Reset

func (x *ListTaskExecutionsRequest) Reset()

func (*ListTaskExecutionsRequest) String

func (x *ListTaskExecutionsRequest) String() string

type ListTaskExecutionsResponse

type ListTaskExecutionsResponse struct {
	Executions []*TaskExecution `protobuf:"bytes,1,rep,name=executions,proto3" json:"executions,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTaskExecutionsResponse) Descriptor deprecated

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

Deprecated: Use ListTaskExecutionsResponse.ProtoReflect.Descriptor instead.

func (*ListTaskExecutionsResponse) GetExecutions

func (x *ListTaskExecutionsResponse) GetExecutions() []*TaskExecution

func (*ListTaskExecutionsResponse) ProtoMessage

func (*ListTaskExecutionsResponse) ProtoMessage()

func (*ListTaskExecutionsResponse) ProtoReflect

func (*ListTaskExecutionsResponse) Reset

func (x *ListTaskExecutionsResponse) Reset()

func (*ListTaskExecutionsResponse) String

func (x *ListTaskExecutionsResponse) String() string

type PrepareRequest

type PrepareRequest struct {
	Eid      int64  `protobuf:"varint,1,opt,name=eid,proto3" json:"eid,omitempty"` // execution id
	TaskId   int64  `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	TaskName string `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`
	// 这里有两部分
	// 1 一部分是通过管理后台,业务方自己搞的参数
	// 2. 另外一部分是我们调度用的,比如说 offset, limit
	// 即包含了业务参数和调度参数 (e.g., offset, limit)
	Params map[string]string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PrepareRequest) Descriptor deprecated

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

Deprecated: Use PrepareRequest.ProtoReflect.Descriptor instead.

func (*PrepareRequest) GetEid

func (x *PrepareRequest) GetEid() int64

func (*PrepareRequest) GetParams

func (x *PrepareRequest) GetParams() map[string]string

func (*PrepareRequest) GetTaskId

func (x *PrepareRequest) GetTaskId() int64

func (*PrepareRequest) GetTaskName

func (x *PrepareRequest) GetTaskName() string

func (*PrepareRequest) ProtoMessage

func (*PrepareRequest) ProtoMessage()

func (*PrepareRequest) ProtoReflect

func (x *PrepareRequest) ProtoReflect() protoreflect.Message

func (*PrepareRequest) Reset

func (x *PrepareRequest) Reset()

func (*PrepareRequest) String

func (x *PrepareRequest) String() string

type PrepareResponse

type PrepareResponse struct {
	Params map[string]string `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*PrepareResponse) Descriptor deprecated

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

Deprecated: Use PrepareResponse.ProtoReflect.Descriptor instead.

func (*PrepareResponse) GetParams

func (x *PrepareResponse) GetParams() map[string]string

func (*PrepareResponse) ProtoMessage

func (*PrepareResponse) ProtoMessage()

func (*PrepareResponse) ProtoReflect

func (x *PrepareResponse) ProtoReflect() protoreflect.Message

func (*PrepareResponse) Reset

func (x *PrepareResponse) Reset()

func (*PrepareResponse) String

func (x *PrepareResponse) String() string

type PullTaskRequest

type PullTaskRequest struct {
	ServiceName string   `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // 这个机器所属的分组 ServiceName (比如:ework-executor-node1)
	Handlers    []string `protobuf:"bytes,2,rep,name=handlers,proto3" json:"handlers,omitempty"`                          // 这台机器目前可支持的所有 Handler 名字 (如 shell, demo)
	NodeId      string   `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`                // 具体这台机器的唯一实例 ID
	// contains filtered or unexported fields
}

执行节点长轮询发起请求获取活儿

func (*PullTaskRequest) Descriptor deprecated

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

Deprecated: Use PullTaskRequest.ProtoReflect.Descriptor instead.

func (*PullTaskRequest) GetHandlers

func (x *PullTaskRequest) GetHandlers() []string

func (*PullTaskRequest) GetNodeId

func (x *PullTaskRequest) GetNodeId() string

func (*PullTaskRequest) GetServiceName

func (x *PullTaskRequest) GetServiceName() string

func (*PullTaskRequest) ProtoMessage

func (*PullTaskRequest) ProtoMessage()

func (*PullTaskRequest) ProtoReflect

func (x *PullTaskRequest) ProtoReflect() protoreflect.Message

func (*PullTaskRequest) Reset

func (x *PullTaskRequest) Reset()

func (*PullTaskRequest) String

func (x *PullTaskRequest) String() string

type PullTaskResponse

type PullTaskResponse struct {
	HasTask bool `protobuf:"varint,1,opt,name=has_task,json=hasTask,proto3" json:"has_task,omitempty"` // 是否取到活儿了
	// 如果取到了,直接复用刚才的 ExecuteRequest 下发给它!
	TaskReq *ExecuteRequest `protobuf:"bytes,2,opt,name=task_req,json=taskReq,proto3" json:"task_req,omitempty"`
	// contains filtered or unexported fields
}

func (*PullTaskResponse) Descriptor deprecated

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

Deprecated: Use PullTaskResponse.ProtoReflect.Descriptor instead.

func (*PullTaskResponse) GetHasTask

func (x *PullTaskResponse) GetHasTask() bool

func (*PullTaskResponse) GetTaskReq

func (x *PullTaskResponse) GetTaskReq() *ExecuteRequest

func (*PullTaskResponse) ProtoMessage

func (*PullTaskResponse) ProtoMessage()

func (*PullTaskResponse) ProtoReflect

func (x *PullTaskResponse) ProtoReflect() protoreflect.Message

func (*PullTaskResponse) Reset

func (x *PullTaskResponse) Reset()

func (*PullTaskResponse) String

func (x *PullTaskResponse) String() string

type QueryRequest

type QueryRequest struct {
	Eid int64 `protobuf:"varint,1,opt,name=eid,proto3" json:"eid,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRequest) Descriptor deprecated

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetEid

func (x *QueryRequest) GetEid() int64

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

func (x *QueryRequest) ProtoReflect() protoreflect.Message

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) String

func (x *QueryRequest) String() string

type QueryResponse

type QueryResponse struct {
	ExecutionState *ExecutionState `protobuf:"bytes,1,opt,name=execution_state,json=executionState,proto3" json:"execution_state,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryResponse) Descriptor deprecated

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetExecutionState

func (x *QueryResponse) GetExecutionState() *ExecutionState

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

func (x *QueryResponse) ProtoReflect() protoreflect.Message

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) String

func (x *QueryResponse) String() string

type TaskExecution

type TaskExecution struct {
	Id              int64           `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	TaskId          int64           `protobuf:"varint,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
	TaskName        string          `protobuf:"bytes,3,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`
	StartTime       int64           `protobuf:"varint,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime         int64           `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	Status          ExecutionStatus `protobuf:"varint,6,opt,name=status,proto3,enum=etask.executor.v1.ExecutionStatus" json:"status,omitempty"`
	RunningProgress int32           `protobuf:"varint,7,opt,name=running_progress,json=runningProgress,proto3" json:"running_progress,omitempty"`
	ExecutorNodeId  string          `protobuf:"bytes,8,opt,name=executor_node_id,json=executorNodeId,proto3" json:"executor_node_id,omitempty"`
	TaskResult      string          `protobuf:"bytes,9,opt,name=task_result,json=taskResult,proto3" json:"task_result,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskExecution) Descriptor deprecated

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

Deprecated: Use TaskExecution.ProtoReflect.Descriptor instead.

func (*TaskExecution) GetEndTime

func (x *TaskExecution) GetEndTime() int64

func (*TaskExecution) GetExecutorNodeId

func (x *TaskExecution) GetExecutorNodeId() string

func (*TaskExecution) GetId

func (x *TaskExecution) GetId() int64

func (*TaskExecution) GetRunningProgress

func (x *TaskExecution) GetRunningProgress() int32

func (*TaskExecution) GetStartTime

func (x *TaskExecution) GetStartTime() int64

func (*TaskExecution) GetStatus

func (x *TaskExecution) GetStatus() ExecutionStatus

func (*TaskExecution) GetTaskId

func (x *TaskExecution) GetTaskId() int64

func (*TaskExecution) GetTaskName

func (x *TaskExecution) GetTaskName() string

func (*TaskExecution) GetTaskResult

func (x *TaskExecution) GetTaskResult() string

func (*TaskExecution) ProtoMessage

func (*TaskExecution) ProtoMessage()

func (*TaskExecution) ProtoReflect

func (x *TaskExecution) ProtoReflect() protoreflect.Message

func (*TaskExecution) Reset

func (x *TaskExecution) Reset()

func (*TaskExecution) String

func (x *TaskExecution) String() string

type TaskExecutionList

type TaskExecutionList struct {
	Executions []*TaskExecution `protobuf:"bytes,1,rep,name=executions,proto3" json:"executions,omitempty"`
	// contains filtered or unexported fields
}

func (*TaskExecutionList) Descriptor deprecated

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

Deprecated: Use TaskExecutionList.ProtoReflect.Descriptor instead.

func (*TaskExecutionList) GetExecutions

func (x *TaskExecutionList) GetExecutions() []*TaskExecution

func (*TaskExecutionList) ProtoMessage

func (*TaskExecutionList) ProtoMessage()

func (*TaskExecutionList) ProtoReflect

func (x *TaskExecutionList) ProtoReflect() protoreflect.Message

func (*TaskExecutionList) Reset

func (x *TaskExecutionList) Reset()

func (*TaskExecutionList) String

func (x *TaskExecutionList) String() string

type TaskExecutionServiceClient

type TaskExecutionServiceClient interface {
	// 列出任务执行记录
	ListTaskExecutions(ctx context.Context, in *ListTaskExecutionsRequest, opts ...grpc.CallOption) (*ListTaskExecutionsResponse, error)
	// 获取执行日志
	GetExecutionLogs(ctx context.Context, in *GetExecutionLogsRequest, opts ...grpc.CallOption) (*GetExecutionLogsResponse, error)
	// 批量列出任务执行记录
	BatchListTaskExecutions(ctx context.Context, in *BatchListTaskExecutionsRequest, opts ...grpc.CallOption) (*BatchListTaskExecutionsResponse, error)
}

TaskExecutionServiceClient is the client API for TaskExecutionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TaskExecutionServiceServer

type TaskExecutionServiceServer interface {
	// 列出任务执行记录
	ListTaskExecutions(context.Context, *ListTaskExecutionsRequest) (*ListTaskExecutionsResponse, error)
	// 获取执行日志
	GetExecutionLogs(context.Context, *GetExecutionLogsRequest) (*GetExecutionLogsResponse, error)
	// 批量列出任务执行记录
	BatchListTaskExecutions(context.Context, *BatchListTaskExecutionsRequest) (*BatchListTaskExecutionsResponse, error)
	// contains filtered or unexported methods
}

TaskExecutionServiceServer is the server API for TaskExecutionService service. All implementations must embed UnimplementedTaskExecutionServiceServer for forward compatibility.

type UnimplementedAgentServiceServer

type UnimplementedAgentServiceServer struct{}

UnimplementedAgentServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAgentServiceServer) PullTask

type UnimplementedExecutorServiceServer

type UnimplementedExecutorServiceServer struct{}

UnimplementedExecutorServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedExecutorServiceServer) Execute

func (UnimplementedExecutorServiceServer) Interrupt

func (UnimplementedExecutorServiceServer) Prepare

func (UnimplementedExecutorServiceServer) Query

type UnimplementedTaskExecutionServiceServer

type UnimplementedTaskExecutionServiceServer struct{}

UnimplementedTaskExecutionServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedTaskExecutionServiceServer) GetExecutionLogs

func (UnimplementedTaskExecutionServiceServer) ListTaskExecutions

type UnsafeAgentServiceServer

type UnsafeAgentServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.

type UnsafeExecutorServiceServer

type UnsafeExecutorServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeExecutorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExecutorServiceServer will result in compilation errors.

type UnsafeTaskExecutionServiceServer

type UnsafeTaskExecutionServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTaskExecutionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TaskExecutionServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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