// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc (unknown) // source: state/v1/task_log.proto package statev1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" 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) ) // TaskLogEntry mirrors internal/logging.Entry: one decoded log line. fields // carries every remaining key as a JSON object string, the same way Event // carries its data, so structured context survives the hop without this // contract having to know what a call site attached. type TaskLogEntry struct { state protoimpl.MessageState `protogen:"open.v1"` Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"` Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` FieldsJson string `protobuf:"bytes,5,opt,name=fields_json,json=fieldsJson,proto3" json:"fields_json,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *TaskLogEntry) Reset() { *x = TaskLogEntry{} mi := &file_state_v1_task_log_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *TaskLogEntry) String() string { return protoimpl.X.MessageStringOf(x) } func (*TaskLogEntry) ProtoMessage() {} func (x *TaskLogEntry) ProtoReflect() protoreflect.Message { mi := &file_state_v1_task_log_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 TaskLogEntry.ProtoReflect.Descriptor instead. func (*TaskLogEntry) Descriptor() ([]byte, []int) { return file_state_v1_task_log_proto_rawDescGZIP(), []int{0} } func (x *TaskLogEntry) GetId() int64 { if x != nil { return x.Id } return 0 } func (x *TaskLogEntry) GetTime() *timestamppb.Timestamp { if x != nil { return x.Time } return nil } func (x *TaskLogEntry) GetLevel() string { if x != nil { return x.Level } return "" } func (x *TaskLogEntry) GetMsg() string { if x != nil { return x.Msg } return "" } func (x *TaskLogEntry) GetFieldsJson() string { if x != nil { return x.FieldsJson } return "" } // ReadTaskLog returns a page of one task attempt's decoded log. attempt is the // attempt the caller resolved (the dashboard sends the task's current attempt // when the request omitted one). levels, component, contains, since and until // carry the whole query the logging package's Tail accepts -- the wire mirrors // that query rather than a subset of it, so a filter cannot silently stop // working by crossing the boundary. limit is caller-capped // (docs/prds/state-store-contract.md ยง8: the log cap is 2000). type ReadTaskLogRequest struct { state protoimpl.MessageState `protogen:"open.v1"` TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` Levels []string `protobuf:"bytes,4,rep,name=levels,proto3" json:"levels,omitempty"` Component string `protobuf:"bytes,5,opt,name=component,proto3" json:"component,omitempty"` Contains string `protobuf:"bytes,6,opt,name=contains,proto3" json:"contains,omitempty"` Since *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=since,proto3" json:"since,omitempty"` Until *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=until,proto3" json:"until,omitempty"` // stage filters on an entry's own "stage" field. Only entries a stage // tagged carry one -- agent and tool output is logged without a stage, so a // stage filter narrows the file rather than covering it. Empty means any. Stage string `protobuf:"bytes,9,opt,name=stage,proto3" json:"stage,omitempty"` // before_id is the byte-offset cursor a previous page returned as cursor: the // read returns the most recent matching entries ending at or before it. Zero // reads the tail, which is the page the dashboard opens on. BeforeId int64 `protobuf:"varint,10,opt,name=before_id,json=beforeId,proto3" json:"before_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ReadTaskLogRequest) Reset() { *x = ReadTaskLogRequest{} mi := &file_state_v1_task_log_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ReadTaskLogRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ReadTaskLogRequest) ProtoMessage() {} func (x *ReadTaskLogRequest) ProtoReflect() protoreflect.Message { mi := &file_state_v1_task_log_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 ReadTaskLogRequest.ProtoReflect.Descriptor instead. func (*ReadTaskLogRequest) Descriptor() ([]byte, []int) { return file_state_v1_task_log_proto_rawDescGZIP(), []int{1} } func (x *ReadTaskLogRequest) GetTaskId() int64 { if x != nil { return x.TaskId } return 0 } func (x *ReadTaskLogRequest) GetAttempt() int64 { if x != nil { return x.Attempt } return 0 } func (x *ReadTaskLogRequest) GetLimit() int64 { if x != nil { return x.Limit } return 0 } func (x *ReadTaskLogRequest) GetLevels() []string { if x != nil { return x.Levels } return nil } func (x *ReadTaskLogRequest) GetComponent() string { if x != nil { return x.Component } return "" } func (x *ReadTaskLogRequest) GetContains() string { if x != nil { return x.Contains } return "" } func (x *ReadTaskLogRequest) GetSince() *timestamppb.Timestamp { if x != nil { return x.Since } return nil } func (x *ReadTaskLogRequest) GetUntil() *timestamppb.Timestamp { if x != nil { return x.Until } return nil } func (x *ReadTaskLogRequest) GetStage() string { if x != nil { return x.Stage } return "" } func (x *ReadTaskLogRequest) GetBeforeId() int64 { if x != nil { return x.BeforeId } return 0 } // found=false is not an error: the task has no log file for that attempt. // That is a different condition from a process that cannot read logs at all // (codes.Unavailable), and the dashboard reports them differently. type ReadTaskLogResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Entries []*TaskLogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` Attempt int64 `protobuf:"varint,3,opt,name=attempt,proto3" json:"attempt,omitempty"` Found bool `protobuf:"varint,4,opt,name=found,proto3" json:"found,omitempty"` Components []string `protobuf:"bytes,5,rep,name=components,proto3" json:"components,omitempty"` // file is the path read, so the page can name where the log came from. It // is the state directory's own layout, reported to an already-authenticated // operator; no caller is expected to open it. File string `protobuf:"bytes,6,opt,name=file,proto3" json:"file,omitempty"` // more_available reports matching entries did not fit in this page; cursor // is the before_id for the next older one. truncated is separate: it means // the log is larger than the readable scan window, so its oldest entries // cannot be reached by paging at all. MoreAvailable bool `protobuf:"varint,7,opt,name=more_available,json=moreAvailable,proto3" json:"more_available,omitempty"` Cursor int64 `protobuf:"varint,8,opt,name=cursor,proto3" json:"cursor,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ReadTaskLogResponse) Reset() { *x = ReadTaskLogResponse{} mi := &file_state_v1_task_log_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ReadTaskLogResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ReadTaskLogResponse) ProtoMessage() {} func (x *ReadTaskLogResponse) ProtoReflect() protoreflect.Message { mi := &file_state_v1_task_log_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 ReadTaskLogResponse.ProtoReflect.Descriptor instead. func (*ReadTaskLogResponse) Descriptor() ([]byte, []int) { return file_state_v1_task_log_proto_rawDescGZIP(), []int{2} } func (x *ReadTaskLogResponse) GetEntries() []*TaskLogEntry { if x != nil { return x.Entries } return nil } func (x *ReadTaskLogResponse) GetTruncated() bool { if x != nil { return x.Truncated } return false } func (x *ReadTaskLogResponse) GetAttempt() int64 { if x != nil { return x.Attempt } return 0 } func (x *ReadTaskLogResponse) GetFound() bool { if x != nil { return x.Found } return false } func (x *ReadTaskLogResponse) GetComponents() []string { if x != nil { return x.Components } return nil } func (x *ReadTaskLogResponse) GetFile() string { if x != nil { return x.File } return "" } func (x *ReadTaskLogResponse) GetMoreAvailable() bool { if x != nil { return x.MoreAvailable } return false } func (x *ReadTaskLogResponse) GetCursor() int64 { if x != nil { return x.Cursor } return 0 } // StreamTaskLogContent returns one attempt's log verbatim, for a download. The // bytes are the file's own JSONL, not a re-encoding of it: this contract // transports the log, it does not restate the format. found=false, with no // chunks, means the attempt has no log file -- not an error. type StreamTaskLogContentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *StreamTaskLogContentRequest) Reset() { *x = StreamTaskLogContentRequest{} mi := &file_state_v1_task_log_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *StreamTaskLogContentRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*StreamTaskLogContentRequest) ProtoMessage() {} func (x *StreamTaskLogContentRequest) ProtoReflect() protoreflect.Message { mi := &file_state_v1_task_log_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 StreamTaskLogContentRequest.ProtoReflect.Descriptor instead. func (*StreamTaskLogContentRequest) Descriptor() ([]byte, []int) { return file_state_v1_task_log_proto_rawDescGZIP(), []int{3} } func (x *StreamTaskLogContentRequest) GetTaskId() int64 { if x != nil { return x.TaskId } return 0 } func (x *StreamTaskLogContentRequest) GetAttempt() int64 { if x != nil { return x.Attempt } return 0 } type StreamTaskLogContentResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` Attempt int64 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` Found bool `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *StreamTaskLogContentResponse) Reset() { *x = StreamTaskLogContentResponse{} mi := &file_state_v1_task_log_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *StreamTaskLogContentResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*StreamTaskLogContentResponse) ProtoMessage() {} func (x *StreamTaskLogContentResponse) ProtoReflect() protoreflect.Message { mi := &file_state_v1_task_log_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 StreamTaskLogContentResponse.ProtoReflect.Descriptor instead. func (*StreamTaskLogContentResponse) Descriptor() ([]byte, []int) { return file_state_v1_task_log_proto_rawDescGZIP(), []int{4} } func (x *StreamTaskLogContentResponse) GetChunk() []byte { if x != nil { return x.Chunk } return nil } func (x *StreamTaskLogContentResponse) GetAttempt() int64 { if x != nil { return x.Attempt } return 0 } func (x *StreamTaskLogContentResponse) GetFound() bool { if x != nil { return x.Found } return false } var File_state_v1_task_log_proto protoreflect.FileDescriptor const file_state_v1_task_log_proto_rawDesc = "" + "\n" + "\x17state/v1/task_log.proto\x12\bstate.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x97\x01\n" + "\fTaskLogEntry\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12.\n" + "\x04time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\x12\x14\n" + "\x05level\x18\x03 \x01(\tR\x05level\x12\x10\n" + "\x03msg\x18\x04 \x01(\tR\x03msg\x12\x1f\n" + "\vfields_json\x18\x05 \x01(\tR\n" + "fieldsJson\"\xc6\x02\n" + "\x12ReadTaskLogRequest\x12\x17\n" + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x14\n" + "\x05limit\x18\x03 \x01(\x03R\x05limit\x12\x16\n" + "\x06levels\x18\x04 \x03(\tR\x06levels\x12\x1c\n" + "\tcomponent\x18\x05 \x01(\tR\tcomponent\x12\x1a\n" + "\bcontains\x18\x06 \x01(\tR\bcontains\x120\n" + "\x05since\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x05since\x120\n" + "\x05until\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x05until\x12\x14\n" + "\x05stage\x18\t \x01(\tR\x05stage\x12\x1b\n" + "\tbefore_id\x18\n" + " \x01(\x03R\bbeforeId\"\x88\x02\n" + "\x13ReadTaskLogResponse\x120\n" + "\aentries\x18\x01 \x03(\v2\x16.state.v1.TaskLogEntryR\aentries\x12\x1c\n" + "\ttruncated\x18\x02 \x01(\bR\ttruncated\x12\x18\n" + "\aattempt\x18\x03 \x01(\x03R\aattempt\x12\x14\n" + "\x05found\x18\x04 \x01(\bR\x05found\x12\x1e\n" + "\n" + "components\x18\x05 \x03(\tR\n" + "components\x12\x12\n" + "\x04file\x18\x06 \x01(\tR\x04file\x12%\n" + "\x0emore_available\x18\a \x01(\bR\rmoreAvailable\x12\x16\n" + "\x06cursor\x18\b \x01(\x03R\x06cursor\"P\n" + "\x1bStreamTaskLogContentRequest\x12\x17\n" + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + "\aattempt\x18\x02 \x01(\x03R\aattempt\"d\n" + "\x1cStreamTaskLogContentResponse\x12\x14\n" + "\x05chunk\x18\x01 \x01(\fR\x05chunk\x12\x18\n" + "\aattempt\x18\x02 \x01(\x03R\aattempt\x12\x14\n" + "\x05found\x18\x03 \x01(\bR\x05found2\xc5\x01\n" + "\x0eTaskLogService\x12J\n" + "\vReadTaskLog\x12\x1c.state.v1.ReadTaskLogRequest\x1a\x1d.state.v1.ReadTaskLogResponse\x12g\n" + "\x14StreamTaskLogContent\x12%.state.v1.StreamTaskLogContentRequest\x1a&.state.v1.StreamTaskLogContentResponse0\x01B\xa6\x01\n" + "\fcom.state.v1B\fTaskLogProtoP\x01ZGgithub.com/samcharles93/archie-core/internal/contracts/state/v1;statev1\xa2\x02\x03SXX\xaa\x02\bState.V1\xca\x02\bState\\V1\xe2\x02\x14State\\V1\\GPBMetadata\xea\x02\tState::V1b\x06proto3" var ( file_state_v1_task_log_proto_rawDescOnce sync.Once file_state_v1_task_log_proto_rawDescData []byte ) func file_state_v1_task_log_proto_rawDescGZIP() []byte { file_state_v1_task_log_proto_rawDescOnce.Do(func() { file_state_v1_task_log_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_state_v1_task_log_proto_rawDesc), len(file_state_v1_task_log_proto_rawDesc))) }) return file_state_v1_task_log_proto_rawDescData } var file_state_v1_task_log_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_state_v1_task_log_proto_goTypes = []any{ (*TaskLogEntry)(nil), // 0: state.v1.TaskLogEntry (*ReadTaskLogRequest)(nil), // 1: state.v1.ReadTaskLogRequest (*ReadTaskLogResponse)(nil), // 2: state.v1.ReadTaskLogResponse (*StreamTaskLogContentRequest)(nil), // 3: state.v1.StreamTaskLogContentRequest (*StreamTaskLogContentResponse)(nil), // 4: state.v1.StreamTaskLogContentResponse (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp } var file_state_v1_task_log_proto_depIdxs = []int32{ 5, // 0: state.v1.TaskLogEntry.time:type_name -> google.protobuf.Timestamp 5, // 1: state.v1.ReadTaskLogRequest.since:type_name -> google.protobuf.Timestamp 5, // 2: state.v1.ReadTaskLogRequest.until:type_name -> google.protobuf.Timestamp 0, // 3: state.v1.ReadTaskLogResponse.entries:type_name -> state.v1.TaskLogEntry 1, // 4: state.v1.TaskLogService.ReadTaskLog:input_type -> state.v1.ReadTaskLogRequest 3, // 5: state.v1.TaskLogService.StreamTaskLogContent:input_type -> state.v1.StreamTaskLogContentRequest 2, // 6: state.v1.TaskLogService.ReadTaskLog:output_type -> state.v1.ReadTaskLogResponse 4, // 7: state.v1.TaskLogService.StreamTaskLogContent:output_type -> state.v1.StreamTaskLogContentResponse 6, // [6:8] is the sub-list for method output_type 4, // [4:6] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name 4, // [4:4] is the sub-list for extension extendee 0, // [0:4] is the sub-list for field type_name } func init() { file_state_v1_task_log_proto_init() } func file_state_v1_task_log_proto_init() { if File_state_v1_task_log_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_task_log_proto_rawDesc), len(file_state_v1_task_log_proto_rawDesc)), NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 1, }, GoTypes: file_state_v1_task_log_proto_goTypes, DependencyIndexes: file_state_v1_task_log_proto_depIdxs, MessageInfos: file_state_v1_task_log_proto_msgTypes, }.Build() File_state_v1_task_log_proto = out.File file_state_v1_task_log_proto_goTypes = nil file_state_v1_task_log_proto_depIdxs = nil }