mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-01 16:25:44 +08:00
### What problem does this PR solve? 1. Go ingestion server will connected with admin server with gRPC stream 2. Go ingestion server will be responsible for ingestion tasks ``` RAGFlow(admin)> list ingestors; +-----------------+-----------+----------------------------------+---------------------------+----------+------------+--------------+--------+------------+---------------+ | address | cpu_usage | id | last_heartbeat | name | process_id | rss_usage | status | task_count | vms_usage | +-----------------+-----------+----------------------------------+---------------------------+----------+------------+--------------+--------+------------+---------------+ | 127.0.0.1:58564 | 0 | bdd1870eea2646e0aacb8a2cd3307aa2 | 2026-05-24T18:16:17+08:00 | ingestor | 680152 | 212.72265625 | active | 0 | 2589.12109375 | +-----------------+-----------+----------------------------------+---------------------------+----------+------------+--------------+--------+------------+---------------+ RAGFlow(admin)> start ingestion 'abc'; +----------------------------------+ | task_id | +----------------------------------+ | e714777639ca4760ab427b5f211e81ad | +----------------------------------+ RAGFlow(admin)> stop ingestion 'f7bd39d0a724457eb5fdce6d81699776'; +----------------------------------+ | task_id | +----------------------------------+ | f7bd39d0a724457eb5fdce6d81699776 | +----------------------------------+ RAGFlow(admin)> list tasks; +-----+----------------------------------+-------+------+----------------------------------+---------------------------+------------+------------+ | ETA | assign_to | error | from | id | last_update | start_time | status | +-----+----------------------------------+-------+------+----------------------------------+---------------------------+------------+------------+ | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | eae6431da72a40e796cff3a03008091b | 2026-05-24T19:46:03+08:00 | | COMPLETED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 6cccdd174bd049ecb05a774bbb47593f | 2026-05-24T19:46:03+08:00 | | COMPLETED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | ef360d777e57485799adb96b30f2b4b8 | 2026-05-24T19:46:03+08:00 | | CANCELED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | bcc5c5448cb64de48b6b6171c36fb790 | 2026-05-24T19:46:03+08:00 | | CANCELED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | bfc25384c43a443294fe2da979a38ac2 | 2026-05-24T19:46:03+08:00 | | DISPATCHED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 84960537b85d413b8990a9efd5952d67 | 2026-05-24T19:46:04+08:00 | | DISPATCHED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 3d223c1b51e24b36861a3bfb2f1d58d4 | 2026-05-24T19:46:03+08:00 | | CANCELED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | e433b0e356b846c89c301621a3c54494 | 2026-05-24T19:46:03+08:00 | | COMPLETED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 7c93a3880f074ebd8eca14e6b51bb7ef | 2026-05-24T19:46:03+08:00 | | COMPLETED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | df2e4ef51aaf4390bff9a23f2692486e | 2026-05-24T19:46:04+08:00 | | DISPATCHED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 7377c53010194ef7a83aa206698d66ff | 2026-05-24T19:46:05+08:00 | | DISPATCHED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | df64d1a1f9d348e3a2f174c4d7d69e73 | 2026-05-24T19:46:05+08:00 | | DISPATCHED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | b59834512e2847e1bdf13ace04b8a456 | 2026-05-24T19:46:06+08:00 | | DISPATCHED | | 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 0064bb0ab69344028d1ecfda053826f4 | 2026-05-24T19:46:03+08:00 | | QUEUED | +-----+----------------------------------+-------+------+----------------------------------+---------------------------+------------+------------+ ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
796 lines
24 KiB
Go
796 lines
24 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v3.21.12
|
|
// source: internal/proto/ingestion.proto
|
|
|
|
package common
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
type IngestionMessage struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
IngestorId string `protobuf:"bytes,1,opt,name=ingestor_id,json=ingestorId,proto3" json:"ingestor_id,omitempty"`
|
|
MessageType string `protobuf:"bytes,2,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` // REGISTER, HEARTBEAT, TASK_RESULT, TASK_PROGRESS, PULL_REQUEST
|
|
RegisterInfo *RegisterInfo `protobuf:"bytes,3,opt,name=register_info,json=registerInfo,proto3" json:"register_info,omitempty"`
|
|
HeartbeatInfo *HeartbeatInfo `protobuf:"bytes,4,opt,name=heartbeat_info,json=heartbeatInfo,proto3" json:"heartbeat_info,omitempty"`
|
|
TaskResult *TaskResult `protobuf:"bytes,5,opt,name=task_result,json=taskResult,proto3" json:"task_result,omitempty"`
|
|
TaskProgress *TaskProgress `protobuf:"bytes,6,opt,name=task_progress,json=taskProgress,proto3" json:"task_progress,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *IngestionMessage) Reset() {
|
|
*x = IngestionMessage{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *IngestionMessage) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*IngestionMessage) ProtoMessage() {}
|
|
|
|
func (x *IngestionMessage) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use IngestionMessage.ProtoReflect.Descriptor instead.
|
|
func (*IngestionMessage) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *IngestionMessage) GetIngestorId() string {
|
|
if x != nil {
|
|
return x.IngestorId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *IngestionMessage) GetMessageType() string {
|
|
if x != nil {
|
|
return x.MessageType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *IngestionMessage) GetRegisterInfo() *RegisterInfo {
|
|
if x != nil {
|
|
return x.RegisterInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *IngestionMessage) GetHeartbeatInfo() *HeartbeatInfo {
|
|
if x != nil {
|
|
return x.HeartbeatInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *IngestionMessage) GetTaskResult() *TaskResult {
|
|
if x != nil {
|
|
return x.TaskResult
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *IngestionMessage) GetTaskProgress() *TaskProgress {
|
|
if x != nil {
|
|
return x.TaskProgress
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AdminMessage struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MessageType string `protobuf:"bytes,1,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"` // TASK_ASSIGNMENT, ACK, PONG, RECONNECT
|
|
TaskAssignment *TaskAssignment `protobuf:"bytes,2,opt,name=task_assignment,json=taskAssignment,proto3" json:"task_assignment,omitempty"`
|
|
AckInfo *AckInfo `protobuf:"bytes,3,opt,name=ack_info,json=ackInfo,proto3" json:"ack_info,omitempty"`
|
|
ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AdminMessage) Reset() {
|
|
*x = AdminMessage{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AdminMessage) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AdminMessage) ProtoMessage() {}
|
|
|
|
func (x *AdminMessage) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AdminMessage.ProtoReflect.Descriptor instead.
|
|
func (*AdminMessage) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *AdminMessage) GetMessageType() string {
|
|
if x != nil {
|
|
return x.MessageType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AdminMessage) GetTaskAssignment() *TaskAssignment {
|
|
if x != nil {
|
|
return x.TaskAssignment
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *AdminMessage) GetAckInfo() *AckInfo {
|
|
if x != nil {
|
|
return x.AckInfo
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *AdminMessage) GetErrorMessage() string {
|
|
if x != nil {
|
|
return x.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RegisterInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MaxConcurrency int32 `protobuf:"varint,1,opt,name=max_concurrency,json=maxConcurrency,proto3" json:"max_concurrency,omitempty"`
|
|
SupportedDocTypes []string `protobuf:"bytes,2,rep,name=supported_doc_types,json=supportedDocTypes,proto3" json:"supported_doc_types,omitempty"`
|
|
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RegisterInfo) Reset() {
|
|
*x = RegisterInfo{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RegisterInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RegisterInfo) ProtoMessage() {}
|
|
|
|
func (x *RegisterInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RegisterInfo.ProtoReflect.Descriptor instead.
|
|
func (*RegisterInfo) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *RegisterInfo) GetMaxConcurrency() int32 {
|
|
if x != nil {
|
|
return x.MaxConcurrency
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RegisterInfo) GetSupportedDocTypes() []string {
|
|
if x != nil {
|
|
return x.SupportedDocTypes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RegisterInfo) GetVersion() string {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RegisterInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type HeartbeatInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TaskStates []*TaskState `protobuf:"bytes,1,rep,name=task_states,json=taskStates,proto3" json:"task_states,omitempty"`
|
|
DeleteTaskIds []string `protobuf:"bytes,2,rep,name=delete_task_ids,json=deleteTaskIds,proto3" json:"delete_task_ids,omitempty"`
|
|
CpuUsage float32 `protobuf:"fixed32,3,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"` // percentage
|
|
VmsUsage float32 `protobuf:"fixed32,4,opt,name=vms_usage,json=vmsUsage,proto3" json:"vms_usage,omitempty"` // absolute value
|
|
RssUsage float32 `protobuf:"fixed32,5,opt,name=rss_usage,json=rssUsage,proto3" json:"rss_usage,omitempty"` // absolute value
|
|
ProcessId int64 `protobuf:"varint,6,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` // pid
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *HeartbeatInfo) Reset() {
|
|
*x = HeartbeatInfo{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *HeartbeatInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*HeartbeatInfo) ProtoMessage() {}
|
|
|
|
func (x *HeartbeatInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use HeartbeatInfo.ProtoReflect.Descriptor instead.
|
|
func (*HeartbeatInfo) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *HeartbeatInfo) GetTaskStates() []*TaskState {
|
|
if x != nil {
|
|
return x.TaskStates
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *HeartbeatInfo) GetDeleteTaskIds() []string {
|
|
if x != nil {
|
|
return x.DeleteTaskIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *HeartbeatInfo) GetCpuUsage() float32 {
|
|
if x != nil {
|
|
return x.CpuUsage
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *HeartbeatInfo) GetVmsUsage() float32 {
|
|
if x != nil {
|
|
return x.VmsUsage
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *HeartbeatInfo) GetRssUsage() float32 {
|
|
if x != nil {
|
|
return x.RssUsage
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *HeartbeatInfo) GetProcessId() int64 {
|
|
if x != nil {
|
|
return x.ProcessId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type TaskState struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // PENDING, RUNNING, COMPLETED, FAILED, CANCELLED
|
|
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
EstimatedRemainingTimeSeconds int64 `protobuf:"varint,4,opt,name=estimated_remaining_time_seconds,json=estimatedRemainingTimeSeconds,proto3" json:"estimated_remaining_time_seconds,omitempty"`
|
|
ComeFrom string `protobuf:"bytes,5,opt,name=come_from,json=comeFrom,proto3" json:"come_from,omitempty"`
|
|
StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *TaskState) Reset() {
|
|
*x = TaskState{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *TaskState) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*TaskState) ProtoMessage() {}
|
|
|
|
func (x *TaskState) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use TaskState.ProtoReflect.Descriptor instead.
|
|
func (*TaskState) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *TaskState) GetTaskId() string {
|
|
if x != nil {
|
|
return x.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskState) GetStatus() string {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskState) GetErrorMessage() string {
|
|
if x != nil {
|
|
return x.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskState) GetEstimatedRemainingTimeSeconds() int64 {
|
|
if x != nil {
|
|
return x.EstimatedRemainingTimeSeconds
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TaskState) GetComeFrom() string {
|
|
if x != nil {
|
|
return x.ComeFrom
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskState) GetStartTime() int64 {
|
|
if x != nil {
|
|
return x.StartTime
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type TaskAssignment struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
TaskType string `protobuf:"bytes,2,opt,name=task_type,json=taskType,proto3" json:"task_type,omitempty"`
|
|
Config string `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
|
|
ComeFrom string `protobuf:"bytes,4,opt,name=come_from,json=comeFrom,proto3" json:"come_from,omitempty"`
|
|
AssignedTo string `protobuf:"bytes,5,opt,name=assigned_to,json=assignedTo,proto3" json:"assigned_to,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *TaskAssignment) Reset() {
|
|
*x = TaskAssignment{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *TaskAssignment) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*TaskAssignment) ProtoMessage() {}
|
|
|
|
func (x *TaskAssignment) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use TaskAssignment.ProtoReflect.Descriptor instead.
|
|
func (*TaskAssignment) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *TaskAssignment) GetTaskId() string {
|
|
if x != nil {
|
|
return x.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskAssignment) GetTaskType() string {
|
|
if x != nil {
|
|
return x.TaskType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskAssignment) GetConfig() string {
|
|
if x != nil {
|
|
return x.Config
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskAssignment) GetComeFrom() string {
|
|
if x != nil {
|
|
return x.ComeFrom
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskAssignment) GetAssignedTo() string {
|
|
if x != nil {
|
|
return x.AssignedTo
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type TaskResult struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // COMPLETED, FAILED, CANCELLED
|
|
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *TaskResult) Reset() {
|
|
*x = TaskResult{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *TaskResult) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*TaskResult) ProtoMessage() {}
|
|
|
|
func (x *TaskResult) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use TaskResult.ProtoReflect.Descriptor instead.
|
|
func (*TaskResult) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *TaskResult) GetTaskId() string {
|
|
if x != nil {
|
|
return x.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskResult) GetStatus() string {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskResult) GetErrorMessage() string {
|
|
if x != nil {
|
|
return x.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type TaskProgress struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
Progress int32 `protobuf:"varint,2,opt,name=progress,proto3" json:"progress,omitempty"`
|
|
Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *TaskProgress) Reset() {
|
|
*x = TaskProgress{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *TaskProgress) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*TaskProgress) ProtoMessage() {}
|
|
|
|
func (x *TaskProgress) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use TaskProgress.ProtoReflect.Descriptor instead.
|
|
func (*TaskProgress) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *TaskProgress) GetTaskId() string {
|
|
if x != nil {
|
|
return x.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TaskProgress) GetProgress() int32 {
|
|
if x != nil {
|
|
return x.Progress
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TaskProgress) GetInfo() string {
|
|
if x != nil {
|
|
return x.Info
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AckInfo struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
|
|
Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
|
|
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *AckInfo) Reset() {
|
|
*x = AckInfo{}
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *AckInfo) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*AckInfo) ProtoMessage() {}
|
|
|
|
func (x *AckInfo) ProtoReflect() protoreflect.Message {
|
|
mi := &file_internal_proto_ingestion_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use AckInfo.ProtoReflect.Descriptor instead.
|
|
func (*AckInfo) Descriptor() ([]byte, []int) {
|
|
return file_internal_proto_ingestion_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *AckInfo) GetTaskId() string {
|
|
if x != nil {
|
|
return x.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AckInfo) GetSuccess() bool {
|
|
if x != nil {
|
|
return x.Success
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *AckInfo) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_internal_proto_ingestion_proto protoreflect.FileDescriptor
|
|
|
|
const file_internal_proto_ingestion_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1einternal/proto/ingestion.proto\x12\x06common\"\xbf\x02\n" +
|
|
"\x10IngestionMessage\x12\x1f\n" +
|
|
"\vingestor_id\x18\x01 \x01(\tR\n" +
|
|
"ingestorId\x12!\n" +
|
|
"\fmessage_type\x18\x02 \x01(\tR\vmessageType\x129\n" +
|
|
"\rregister_info\x18\x03 \x01(\v2\x14.common.RegisterInfoR\fregisterInfo\x12<\n" +
|
|
"\x0eheartbeat_info\x18\x04 \x01(\v2\x15.common.HeartbeatInfoR\rheartbeatInfo\x123\n" +
|
|
"\vtask_result\x18\x05 \x01(\v2\x12.common.TaskResultR\n" +
|
|
"taskResult\x129\n" +
|
|
"\rtask_progress\x18\x06 \x01(\v2\x14.common.TaskProgressR\ftaskProgress\"\xc3\x01\n" +
|
|
"\fAdminMessage\x12!\n" +
|
|
"\fmessage_type\x18\x01 \x01(\tR\vmessageType\x12?\n" +
|
|
"\x0ftask_assignment\x18\x02 \x01(\v2\x16.common.TaskAssignmentR\x0etaskAssignment\x12*\n" +
|
|
"\back_info\x18\x03 \x01(\v2\x0f.common.AckInfoR\aackInfo\x12#\n" +
|
|
"\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\x95\x01\n" +
|
|
"\fRegisterInfo\x12'\n" +
|
|
"\x0fmax_concurrency\x18\x01 \x01(\x05R\x0emaxConcurrency\x12.\n" +
|
|
"\x13supported_doc_types\x18\x02 \x03(\tR\x11supportedDocTypes\x12\x18\n" +
|
|
"\aversion\x18\x03 \x01(\tR\aversion\x12\x12\n" +
|
|
"\x04name\x18\x04 \x01(\tR\x04name\"\xe1\x01\n" +
|
|
"\rHeartbeatInfo\x122\n" +
|
|
"\vtask_states\x18\x01 \x03(\v2\x11.common.TaskStateR\n" +
|
|
"taskStates\x12&\n" +
|
|
"\x0fdelete_task_ids\x18\x02 \x03(\tR\rdeleteTaskIds\x12\x1b\n" +
|
|
"\tcpu_usage\x18\x03 \x01(\x02R\bcpuUsage\x12\x1b\n" +
|
|
"\tvms_usage\x18\x04 \x01(\x02R\bvmsUsage\x12\x1b\n" +
|
|
"\trss_usage\x18\x05 \x01(\x02R\brssUsage\x12\x1d\n" +
|
|
"\n" +
|
|
"process_id\x18\x06 \x01(\x03R\tprocessId\"\xe6\x01\n" +
|
|
"\tTaskState\x12\x17\n" +
|
|
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x16\n" +
|
|
"\x06status\x18\x02 \x01(\tR\x06status\x12#\n" +
|
|
"\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x12G\n" +
|
|
" estimated_remaining_time_seconds\x18\x04 \x01(\x03R\x1destimatedRemainingTimeSeconds\x12\x1b\n" +
|
|
"\tcome_from\x18\x05 \x01(\tR\bcomeFrom\x12\x1d\n" +
|
|
"\n" +
|
|
"start_time\x18\x06 \x01(\x03R\tstartTime\"\x9c\x01\n" +
|
|
"\x0eTaskAssignment\x12\x17\n" +
|
|
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1b\n" +
|
|
"\ttask_type\x18\x02 \x01(\tR\btaskType\x12\x16\n" +
|
|
"\x06config\x18\x03 \x01(\tR\x06config\x12\x1b\n" +
|
|
"\tcome_from\x18\x04 \x01(\tR\bcomeFrom\x12\x1f\n" +
|
|
"\vassigned_to\x18\x05 \x01(\tR\n" +
|
|
"assignedTo\"b\n" +
|
|
"\n" +
|
|
"TaskResult\x12\x17\n" +
|
|
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x16\n" +
|
|
"\x06status\x18\x02 \x01(\tR\x06status\x12#\n" +
|
|
"\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"W\n" +
|
|
"\fTaskProgress\x12\x17\n" +
|
|
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x1a\n" +
|
|
"\bprogress\x18\x02 \x01(\x05R\bprogress\x12\x12\n" +
|
|
"\x04info\x18\x03 \x01(\tR\x04info\"V\n" +
|
|
"\aAckInfo\x12\x17\n" +
|
|
"\atask_id\x18\x01 \x01(\tR\x06taskId\x12\x18\n" +
|
|
"\asuccess\x18\x02 \x01(\bR\asuccess\x12\x18\n" +
|
|
"\amessage\x18\x03 \x01(\tR\amessage2P\n" +
|
|
"\x10IngestionManager\x12<\n" +
|
|
"\x06Action\x12\x18.common.IngestionMessage\x1a\x14.common.AdminMessage(\x010\x01B\vZ\t./;commonb\x06proto3"
|
|
|
|
var (
|
|
file_internal_proto_ingestion_proto_rawDescOnce sync.Once
|
|
file_internal_proto_ingestion_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_internal_proto_ingestion_proto_rawDescGZIP() []byte {
|
|
file_internal_proto_ingestion_proto_rawDescOnce.Do(func() {
|
|
file_internal_proto_ingestion_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_proto_ingestion_proto_rawDesc), len(file_internal_proto_ingestion_proto_rawDesc)))
|
|
})
|
|
return file_internal_proto_ingestion_proto_rawDescData
|
|
}
|
|
|
|
var file_internal_proto_ingestion_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
|
var file_internal_proto_ingestion_proto_goTypes = []any{
|
|
(*IngestionMessage)(nil), // 0: common.IngestionMessage
|
|
(*AdminMessage)(nil), // 1: common.AdminMessage
|
|
(*RegisterInfo)(nil), // 2: common.RegisterInfo
|
|
(*HeartbeatInfo)(nil), // 3: common.HeartbeatInfo
|
|
(*TaskState)(nil), // 4: common.TaskState
|
|
(*TaskAssignment)(nil), // 5: common.TaskAssignment
|
|
(*TaskResult)(nil), // 6: common.TaskResult
|
|
(*TaskProgress)(nil), // 7: common.TaskProgress
|
|
(*AckInfo)(nil), // 8: common.AckInfo
|
|
}
|
|
var file_internal_proto_ingestion_proto_depIdxs = []int32{
|
|
2, // 0: common.IngestionMessage.register_info:type_name -> common.RegisterInfo
|
|
3, // 1: common.IngestionMessage.heartbeat_info:type_name -> common.HeartbeatInfo
|
|
6, // 2: common.IngestionMessage.task_result:type_name -> common.TaskResult
|
|
7, // 3: common.IngestionMessage.task_progress:type_name -> common.TaskProgress
|
|
5, // 4: common.AdminMessage.task_assignment:type_name -> common.TaskAssignment
|
|
8, // 5: common.AdminMessage.ack_info:type_name -> common.AckInfo
|
|
4, // 6: common.HeartbeatInfo.task_states:type_name -> common.TaskState
|
|
0, // 7: common.IngestionManager.Action:input_type -> common.IngestionMessage
|
|
1, // 8: common.IngestionManager.Action:output_type -> common.AdminMessage
|
|
8, // [8:9] is the sub-list for method output_type
|
|
7, // [7:8] is the sub-list for method input_type
|
|
7, // [7:7] is the sub-list for extension type_name
|
|
7, // [7:7] is the sub-list for extension extendee
|
|
0, // [0:7] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_internal_proto_ingestion_proto_init() }
|
|
func file_internal_proto_ingestion_proto_init() {
|
|
if File_internal_proto_ingestion_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_proto_ingestion_proto_rawDesc), len(file_internal_proto_ingestion_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 9,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_internal_proto_ingestion_proto_goTypes,
|
|
DependencyIndexes: file_internal_proto_ingestion_proto_depIdxs,
|
|
MessageInfos: file_internal_proto_ingestion_proto_msgTypes,
|
|
}.Build()
|
|
File_internal_proto_ingestion_proto = out.File
|
|
file_internal_proto_ingestion_proto_goTypes = nil
|
|
file_internal_proto_ingestion_proto_depIdxs = nil
|
|
}
|