diff --git a/app/pkg/analyze/analyzer.go b/app/pkg/analyze/analyzer.go index 066a0d4..d80530f 100644 --- a/app/pkg/analyze/analyzer.go +++ b/app/pkg/analyze/analyzer.go @@ -11,6 +11,9 @@ import ( "sync" "time" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/jlewi/foyle/app/pkg/logs/matchers" "github.com/jlewi/foyle/app/pkg/runme/converters" @@ -34,6 +37,13 @@ import ( "k8s.io/client-go/util/workqueue" ) +var ( + lagGauge = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "analyzer_logs_lag_seconds", // Metric name + Help: "Lag in seconds between the current time and last processed log entry", // Metric description + }) +) + const ( // traceField is the field that contains the traceId in a log entry. We use this to identify processing related // to a particular trace. We don't use the field "traceId" because these log entries aren't actually part of the @@ -264,6 +274,8 @@ func (a *Analyzer) processLogFile(ctx context.Context, path string) error { traceIDs := make(map[string]bool) + lastLogTime := time.Time{} + // We read the lines line by line. We keep track of all the traceIDs mentioned in those lines. We // Then do a combineAndCheckpoint for all the traceIDs mentioned. Lines are also persisted in a KV store // keyed by traceID. So if on the next iteration we get a new line for a given traceId and need to reprocess @@ -275,6 +287,8 @@ func (a *Analyzer) processLogFile(ctx context.Context, path string) error { continue } + lastLogTime = entry.Time() + // Add the entry to a session if it should be. a.sessBuilder.processLogEntry(entry, a.learnNotifier) @@ -312,7 +326,7 @@ func (a *Analyzer) processLogFile(ctx context.Context, path string) error { } // Now run a combineAndCheckpoint - a.combineAndCheckpoint(ctx, path, offset, traceIDs) + a.combineAndCheckpoint(ctx, path, offset, lastLogTime, traceIDs) // If we are shutting down we don't want to keep processing the file. // By aborting shutdown here as opposed to here we are blocking shutdown for as least as long it takes @@ -326,7 +340,7 @@ func (a *Analyzer) processLogFile(ctx context.Context, path string) error { // combineAndCheckpoint runs a combine operation for all the traceIDs listed in the map. // Progress is then checkpointed. -func (a *Analyzer) combineAndCheckpoint(ctx context.Context, path string, offset int64, traceIDs map[string]bool) { +func (a *Analyzer) combineAndCheckpoint(ctx context.Context, path string, offset int64, lastLogTime time.Time, traceIDs map[string]bool) { log := logs.FromContext(ctx) // Combine the entries for each trace that we saw. // N.B. We could potentially make this more efficient by checking if the log message is the final message @@ -337,7 +351,11 @@ func (a *Analyzer) combineAndCheckpoint(ctx context.Context, path string, offset } } // Update the offset - a.setLogFileOffset(path, offset) + a.setLogFileOffset(path, offset, lastLogTime) + + // Update the lag + lag := time.Since(lastLogTime) + lagGauge.Set(lag.Seconds()) } func (a *Analyzer) GetWatermark() *logspb.LogsWaterMark { @@ -362,13 +380,15 @@ func (a *Analyzer) getLogFileOffset(path string) int64 { return a.logFileOffsets.Offset } -func (a *Analyzer) setLogFileOffset(path string, offset int64) { +func (a *Analyzer) setLogFileOffset(path string, offset int64, lastTimestamp time.Time) { a.mu.Lock() defer a.mu.Unlock() + lastTime := timestamppb.New(lastTimestamp) oldWatermark := a.logFileOffsets a.logFileOffsets = &logspb.LogsWaterMark{ - File: path, - Offset: offset, + File: path, + Offset: offset, + LastLogTimestamp: lastTime, } log := logs.NewLogger() diff --git a/app/pkg/analyze/crud.go b/app/pkg/analyze/crud.go index dc85cc9..72234fc 100644 --- a/app/pkg/analyze/crud.go +++ b/app/pkg/analyze/crud.go @@ -3,6 +3,7 @@ package analyze import ( "context" "sort" + "time" "connectrpc.com/connect" "github.com/jlewi/foyle/app/pkg/logs" @@ -22,14 +23,21 @@ type CrudHandler struct { blocksDB *pebble.DB tracesDB *pebble.DB analyzer *Analyzer + location *time.Location } func NewCrudHandler(cfg config.Config, blocksDB *pebble.DB, tracesDB *pebble.DB, analyzer *Analyzer) (*CrudHandler, error) { + // Load the PST time zone + location, err := time.LoadLocation("America/Los_Angeles") + if err != nil { + return nil, errors.Wrap(err, "Failed to load location America/Los_Angeles") + } return &CrudHandler{ cfg: cfg, blocksDB: blocksDB, tracesDB: tracesDB, analyzer: analyzer, + location: location, }, nil } @@ -112,5 +120,9 @@ func (h *CrudHandler) Status(ctx context.Context, request *connect.Request[logsp Watermark: h.analyzer.GetWatermark(), } + lastTime := response.GetWatermark().GetLastLogTimestamp().AsTime() + lastTime = lastTime.In(h.location) + formattedTime := lastTime.Format("2006-01-02 3:04:05 PM MST") + response.LastLogTimestampHuman = formattedTime return connect.NewResponse(response), nil } diff --git a/app/pkg/analyze/session_manager.go b/app/pkg/analyze/session_manager.go index bb6dd46..81d71e4 100644 --- a/app/pkg/analyze/session_manager.go +++ b/app/pkg/analyze/session_manager.go @@ -7,6 +7,10 @@ import ( "fmt" "os" "path/filepath" + "sync/atomic" + "time" + + "github.com/cenkalti/backoff/v4" "github.com/go-logr/zapr" "go.uber.org/zap" @@ -47,6 +51,11 @@ var ( Name: "sqlite_busy", Help: "Number of operations that failed because sqlite was busy", }) + + activeUpdatesGauge = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "session_manager_active_updates", // Metric name + Help: "Number of active updates", // Metric description + }) ) // GetDDL return the DDL for the database. @@ -63,6 +72,9 @@ type SessionUpdater func(session *logspb.Session) error type SessionsManager struct { queries *fsql.Queries db *sql.DB + // Keep track of the number of concurrent calls to Update. + // This is intended to try to track down why SQLITE_BUSY errors is so frequent. + activeUpdates atomic.Int32 } func NewSessionsManager(db *sql.DB) (*SessionsManager, error) { @@ -81,6 +93,20 @@ func NewSessionsManager(db *sql.DB) (*SessionsManager, error) { log := zapr.NewLogger(zap.L()) log.Info("sqlite busy_timeout set", "timeout", 5000) + if _, err := db.Exec("PRAGMA busy_timeout = 10000;"); err != nil { + return nil, errors.Wrapf(err, "Failed to set busy timeout for the database") + } + + // Activate WAL mode. This hopefully helps with SQLITE_BUSY errors and contention by using a separate file + // to log writes. + // https://www.sqlite.org/wal.html#:~:text=One%20has%20merely%20to%20run,set%20on%20any%20one%20connection. + // This mode is supposedly persistent the next time the application opens it will still be doing this + output, err := db.Exec("PRAGMA journal_mode=WAL;") + log.Info("Set journal mode to WAL", "output", output) + if err != nil { + return nil, errors.Wrapf(err, "Failed to set journal mode to WAL") + } + // Create the dbtx from the actual database queries := fsql.New(db) @@ -117,98 +143,127 @@ func (db *SessionsManager) Get(ctx context.Context, contextID string) (*logspb.S // inserted if the updateFunc returns nil. If the session already exists then the session is passed to updateFunc // and the updated value is then written to the database func (db *SessionsManager) Update(ctx context.Context, contextID string, updateFunc SessionUpdater) error { + // Increment the counter when entering the function + numActive := db.activeUpdates.Add(1) + defer func() { + // Decrement the counter when leaving the function + value := db.activeUpdates.Add(-1) + activeUpdatesGauge.Set(float64(value)) + }() + log := logs.FromContext(ctx) if contextID == "" { return errors.WithStack(errors.New("contextID must be non-empty")) } log = log.WithValues("contextId", contextID) - sessCounter.WithLabelValues("start").Inc() - - tx, err := db.db.BeginTx(ctx, &sql.TxOptions{}) - if err != nil { - sessCounter.WithLabelValues("failedstart").Inc() - return errors.Wrapf(err, "Failed to start transaction") + // Intended to track whether SQLITE_BUSY errors are correlated with the number of concurrent calls to Update. + if numActive > 1 { + log.Info("Concurrent Session Updates", "numActive", numActive) } - err = func() error { - queries := db.queries.WithTx(tx) - // Read the record - sessRow, err := queries.GetSession(ctx, contextID) + activeUpdatesGauge.Set(float64(numActive)) + sessCounter.WithLabelValues("start").Inc() - // If the session doesn't exist then we do nothing because session is initializeed to empty session - session := &logspb.Session{ - ContextId: contextID, - } - if err != nil { - logDBErrors(ctx, err) - if err != sql.ErrNoRows { - sessCounter.WithLabelValues("failedget").Inc() - return errors.Wrapf(err, "Failed to get session with id %v", contextID) + // Wrap the updates in a retry loop. This is intended to deal with SQLITE_BUSY errors and other possible sources + // of contention + b := backoff.NewExponentialBackOff(backoff.WithMaxElapsedTime(5*time.Minute), backoff.WithMaxInterval(30*time.Second)) + for { + err := func() error { + tx, err := db.db.BeginTx(ctx, &sql.TxOptions{}) + if err != nil { + // See https://go.dev/doc/database/execute-transactions We do not to issue a rollback if BeginTx fails + sessCounter.WithLabelValues("failedstart").Inc() + return errors.Wrapf(err, "Failed to start transaction") } - // ErrNoRows means the session doesn't exist so we just continue with the empty session - } else { - // Deserialize the proto - if err := proto.Unmarshal(sessRow.Proto, session); err != nil { - return errors.Wrapf(err, "Failed to deserialize session") + + // Ensure Rollback gets called. + // This is a null op if the transaction has already been committed or rolled back. + defer func() { + if err := tx.Rollback(); err != nil { + log.Error(err, "Failed to rollback transaction") + } + }() + + queries := db.queries.WithTx(tx) + // Read the record + sessRow, err := queries.GetSession(ctx, contextID) + + // If the session doesn't exist then we do nothing because session is initializeed to empty session + session := &logspb.Session{ + ContextId: contextID, + } + if err != nil { + logDBErrors(ctx, err) + if err != sql.ErrNoRows { + sessCounter.WithLabelValues("failedget").Inc() + return errors.Wrapf(err, "Failed to get session with id %v", contextID) + } + // ErrNoRows means the session doesn't exist so we just continue with the empty session + } else { + // Deserialize the proto + if err := proto.Unmarshal(sessRow.Proto, session); err != nil { + return errors.Wrapf(err, "Failed to deserialize session") + } } - } - sessCounter.WithLabelValues("callupdatefunc").Inc() + sessCounter.WithLabelValues("callupdatefunc").Inc() - if err := updateFunc(session); err != nil { - return errors.Wrapf(err, "Failed to update session") - } + if err := updateFunc(session); err != nil { + return errors.Wrapf(err, "Failed to update session") + } - newRow, err := protoToRow(session) - if err != nil { - return errors.Wrapf(err, "Failed to convert session proto to table row") - } + newRow, err := protoToRow(session) + if err != nil { + return errors.Wrapf(err, "Failed to convert session proto to table row") + } - if newRow.Contextid != contextID { - return errors.WithStack(errors.Errorf("contextID in session doesn't match contextID. Update was called with contextID: %v but session has contextID: %v", contextID, newRow.Contextid)) - } + if newRow.Contextid != contextID { + return errors.WithStack(errors.Errorf("contextID in session doesn't match contextID. Update was called with contextID: %v but session has contextID: %v", contextID, newRow.Contextid)) + } - update := fsql.UpdateSessionParams{ - Contextid: contextID, - Proto: newRow.Proto, - Starttime: newRow.Starttime, - Endtime: newRow.Endtime, - Selectedid: newRow.Selectedid, - Selectedkind: newRow.Selectedkind, - TotalInputTokens: newRow.TotalInputTokens, - TotalOutputTokens: newRow.TotalOutputTokens, - NumGenerateTraces: newRow.NumGenerateTraces, - } + update := fsql.UpdateSessionParams{ + Contextid: contextID, + Proto: newRow.Proto, + Starttime: newRow.Starttime, + Endtime: newRow.Endtime, + Selectedid: newRow.Selectedid, + Selectedkind: newRow.Selectedkind, + TotalInputTokens: newRow.TotalInputTokens, + TotalOutputTokens: newRow.TotalOutputTokens, + NumGenerateTraces: newRow.NumGenerateTraces, + } - sessCounter.WithLabelValues("callupdatesession").Inc() - if err := queries.UpdateSession(ctx, update); err != nil { - logDBErrors(ctx, err) - return errors.Wrapf(err, "Failed to update session") - } - return nil - }() + sessCounter.WithLabelValues("callupdatesession").Inc() + if err := queries.UpdateSession(ctx, update); err != nil { + logDBErrors(ctx, err) + return errors.Wrapf(err, "Failed to update session") + } - if err == nil { - if err := tx.Commit(); err != nil { - logDBErrors(ctx, err) - log.Error(err, "Failed to commit transaction") - sessCounter.WithLabelValues("commitfail").Inc() - return errors.Wrapf(err, "Failed to commit transaction") + if err := tx.Commit(); err != nil { + logDBErrors(ctx, err) + log.Error(err, "Failed to commit transaction") + sessCounter.WithLabelValues("commitfail").Inc() + return errors.Wrapf(err, "Failed to commit transaction") + } + sessCounter.WithLabelValues("success").Inc() + return nil + }() + + if err == nil { + sessCounter.WithLabelValues("done").Inc() + return nil } - sessCounter.WithLabelValues("success").Inc() - } else { - logDBErrors(ctx, err) - sessCounter.WithLabelValues("fail").Inc() - log.Error(err, "Failed to update session") - if txErr := tx.Rollback(); txErr != nil { - log.Error(txErr, "Failed to rollback transaction") + + wait := b.NextBackOff() + if wait == backoff.Stop { + sessCounter.WithLabelValues("done").Inc() + err := errors.Errorf("Failed to update session for contextId %s", contextID) + log.Error(err, "Failed to update session") + return err } - return err + time.Sleep(wait) } - - sessCounter.WithLabelValues("done").Inc() - return nil } func (m *SessionsManager) GetSession(ctx context.Context, request *connect.Request[logspb.GetSessionRequest]) (*connect.Response[logspb.GetSessionResponse], error) { diff --git a/protos/README.md b/protos/README.md index 8b32204..6c4933b 100644 --- a/protos/README.md +++ b/protos/README.md @@ -53,9 +53,19 @@ and typescript see [blog](https://buf.build/blog/protobuf-es-the-protocol-buffer More documentation can be found [here](https://github.com/bufbuild/protobuf-es/blob/main/docs/generated_code.md) -## GRPC-Gateway +```bash {"id":"01JEVJYRQKKF8Q8DX7SSX6KGW0"} +# To confirm the installation of the required packages and plugins, run the following commands: +npm list @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf +npm list -g @bufbuild/protoc-gen-connect-es +``` + +# GoLang -We [grpc-gateway](https://grpc-ecosystem.github.io/grpc-gateway/) to generate RESTful services from our grpc services. +* Install the plugin below to get `protoc-gen-go` + +```bash +go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +``` ## connect-go diff --git a/protos/foyle/logs/logs.proto b/protos/foyle/logs/logs.proto index ca82372..37f0426 100644 --- a/protos/foyle/logs/logs.proto +++ b/protos/foyle/logs/logs.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/protobuf/timestamp.proto"; + package foyle.logs; option go_package = "github.com/jlewi/foyle/protos/go/foyle/logs;logspb"; @@ -10,6 +12,9 @@ message LogsWaterMark { string file = 1; // The offset is the offset in the file that is associated with the watermark int64 offset = 2; + + // last_log_timestamp is the timestamp of the last log entry processed + google.protobuf.Timestamp last_log_timestamp = 4; } message GetLogsStatusRequest { @@ -17,4 +22,9 @@ message GetLogsStatusRequest { message GetLogsStatusResponse { LogsWaterMark watermark = 1; + + // last_log_message will be a human readable string for the timestamp of the last processed log message + // This is useful for debugging and monitoring purposes by inspection (i.e. curl by human). For programmatic + // access use watermark.last_log_timestamp + string last_log_timestamp_human = 2; } \ No newline at end of file diff --git a/protos/go/foyle/logs/blocks.pb.go b/protos/go/foyle/logs/blocks.pb.go index 1626e1e..9ea346c 100644 --- a/protos/go/foyle/logs/blocks.pb.go +++ b/protos/go/foyle/logs/blocks.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/logs/blocks.proto @@ -102,11 +102,9 @@ type BlockLog struct { func (x *BlockLog) Reset() { *x = BlockLog{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_blocks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_blocks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockLog) String() string { @@ -117,7 +115,7 @@ func (*BlockLog) ProtoMessage() {} func (x *BlockLog) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_blocks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -262,7 +260,7 @@ func file_foyle_logs_blocks_proto_rawDescGZIP() []byte { var file_foyle_logs_blocks_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_foyle_logs_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_foyle_logs_blocks_proto_goTypes = []interface{}{ +var file_foyle_logs_blocks_proto_goTypes = []any{ (SuggestionStatus)(0), // 0: foyle.logs.SuggestionStatus (*BlockLog)(nil), // 1: foyle.logs.BlockLog (*v1alpha1.Doc)(nil), // 2: Doc @@ -285,20 +283,6 @@ func file_foyle_logs_blocks_proto_init() { if File_foyle_logs_blocks_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_foyle_logs_blocks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/go/foyle/logs/conversion.pb.go b/protos/go/foyle/logs/conversion.pb.go index c56e6f8..f696aed 100644 --- a/protos/go/foyle/logs/conversion.pb.go +++ b/protos/go/foyle/logs/conversion.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/logs/conversion.proto @@ -86,11 +86,9 @@ type ConvertDocRequest struct { func (x *ConvertDocRequest) Reset() { *x = ConvertDocRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_conversion_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_conversion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConvertDocRequest) String() string { @@ -101,7 +99,7 @@ func (*ConvertDocRequest) ProtoMessage() {} func (x *ConvertDocRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_conversion_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -141,11 +139,9 @@ type ConvertDocResponse struct { func (x *ConvertDocResponse) Reset() { *x = ConvertDocResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_conversion_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_conversion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ConvertDocResponse) String() string { @@ -156,7 +152,7 @@ func (*ConvertDocResponse) ProtoMessage() {} func (x *ConvertDocResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_conversion_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -236,7 +232,7 @@ func file_foyle_logs_conversion_proto_rawDescGZIP() []byte { var file_foyle_logs_conversion_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_foyle_logs_conversion_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_foyle_logs_conversion_proto_goTypes = []interface{}{ +var file_foyle_logs_conversion_proto_goTypes = []any{ (ConvertDocRequest_Format)(0), // 0: foyle.logs.ConvertDocRequest.Format (*ConvertDocRequest)(nil), // 1: foyle.logs.ConvertDocRequest (*ConvertDocResponse)(nil), // 2: foyle.logs.ConvertDocResponse @@ -259,32 +255,6 @@ func file_foyle_logs_conversion_proto_init() { if File_foyle_logs_conversion_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_foyle_logs_conversion_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConvertDocRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_conversion_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConvertDocResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/go/foyle/logs/logs.pb.go b/protos/go/foyle/logs/logs.pb.go index 8dd78f9..f49ca21 100644 --- a/protos/go/foyle/logs/logs.pb.go +++ b/protos/go/foyle/logs/logs.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/logs/logs.proto @@ -9,6 +9,7 @@ package logspb 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" ) @@ -30,15 +31,15 @@ type LogsWaterMark struct { File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // The offset is the offset in the file that is associated with the watermark Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + // last_log_timestamp is the timestamp of the last log entry processed + LastLogTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_log_timestamp,json=lastLogTimestamp,proto3" json:"last_log_timestamp,omitempty"` } func (x *LogsWaterMark) Reset() { *x = LogsWaterMark{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_logs_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_logs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogsWaterMark) String() string { @@ -49,7 +50,7 @@ func (*LogsWaterMark) ProtoMessage() {} func (x *LogsWaterMark) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_logs_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -78,6 +79,13 @@ func (x *LogsWaterMark) GetOffset() int64 { return 0 } +func (x *LogsWaterMark) GetLastLogTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.LastLogTimestamp + } + return nil +} + type GetLogsStatusRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -86,11 +94,9 @@ type GetLogsStatusRequest struct { func (x *GetLogsStatusRequest) Reset() { *x = GetLogsStatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_logs_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_logs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLogsStatusRequest) String() string { @@ -101,7 +107,7 @@ func (*GetLogsStatusRequest) ProtoMessage() {} func (x *GetLogsStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_logs_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -122,15 +128,17 @@ type GetLogsStatusResponse struct { unknownFields protoimpl.UnknownFields Watermark *LogsWaterMark `protobuf:"bytes,1,opt,name=watermark,proto3" json:"watermark,omitempty"` + // last_log_message will be a human readable string for the timestamp of the last processed log message + // This is useful for debugging and monitoring purposes by inspection (i.e. curl by human). For programmatic + // access use watermark.last_log_timestamp + LastLogTimestampHuman string `protobuf:"bytes,2,opt,name=last_log_timestamp_human,json=lastLogTimestampHuman,proto3" json:"last_log_timestamp_human,omitempty"` } func (x *GetLogsStatusResponse) Reset() { *x = GetLogsStatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_logs_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_logs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLogsStatusResponse) String() string { @@ -141,7 +149,7 @@ func (*GetLogsStatusResponse) ProtoMessage() {} func (x *GetLogsStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_logs_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,32 +171,50 @@ func (x *GetLogsStatusResponse) GetWatermark() *LogsWaterMark { return nil } +func (x *GetLogsStatusResponse) GetLastLogTimestampHuman() string { + if x != nil { + return x.LastLogTimestampHuman + } + return "" +} + var File_foyle_logs_logs_proto protoreflect.FileDescriptor var file_foyle_logs_logs_proto_rawDesc = []byte{ 0x0a, 0x15, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2e, 0x6c, - 0x6f, 0x67, 0x73, 0x22, 0x3b, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, - 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x37, 0x0a, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, - 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x52, - 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x98, 0x01, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x09, 0x4c, - 0x6f, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x6c, 0x65, 0x77, 0x69, 0x2f, 0x66, 0x6f, 0x79, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x6f, 0x79, - 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3b, 0x6c, 0x6f, 0x67, 0x73, 0x70, 0x62, 0xa2, 0x02, - 0x03, 0x46, 0x4c, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, - 0x73, 0xca, 0x02, 0x0a, 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x5c, 0x4c, 0x6f, 0x67, 0x73, 0xe2, 0x02, - 0x16, 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x5c, 0x4c, 0x6f, 0x67, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x3a, - 0x3a, 0x4c, 0x6f, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x67, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x73, 0x57, 0x61, 0x74, + 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x48, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, + 0x4c, 0x6f, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x16, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, + 0x0a, 0x09, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x4c, + 0x6f, 0x67, 0x73, 0x57, 0x61, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x52, 0x09, 0x77, 0x61, + 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x37, 0x0a, 0x18, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x68, 0x75, + 0x6d, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x4c, + 0x6f, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x75, 0x6d, 0x61, 0x6e, + 0x42, 0x98, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2e, 0x6c, + 0x6f, 0x67, 0x73, 0x42, 0x09, 0x4c, 0x6f, 0x67, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x6c, 0x65, + 0x77, 0x69, 0x2f, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, + 0x67, 0x6f, 0x2f, 0x66, 0x6f, 0x79, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x3b, 0x6c, 0x6f, + 0x67, 0x73, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x46, 0x4c, 0x58, 0xaa, 0x02, 0x0a, 0x46, 0x6f, 0x79, + 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x73, 0xca, 0x02, 0x0a, 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x5c, + 0x4c, 0x6f, 0x67, 0x73, 0xe2, 0x02, 0x16, 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x5c, 0x4c, 0x6f, 0x67, + 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, + 0x46, 0x6f, 0x79, 0x6c, 0x65, 0x3a, 0x3a, 0x4c, 0x6f, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -204,18 +230,20 @@ func file_foyle_logs_logs_proto_rawDescGZIP() []byte { } var file_foyle_logs_logs_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_foyle_logs_logs_proto_goTypes = []interface{}{ +var file_foyle_logs_logs_proto_goTypes = []any{ (*LogsWaterMark)(nil), // 0: foyle.logs.LogsWaterMark (*GetLogsStatusRequest)(nil), // 1: foyle.logs.GetLogsStatusRequest (*GetLogsStatusResponse)(nil), // 2: foyle.logs.GetLogsStatusResponse + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp } var file_foyle_logs_logs_proto_depIdxs = []int32{ - 0, // 0: foyle.logs.GetLogsStatusResponse.watermark:type_name -> foyle.logs.LogsWaterMark - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 3, // 0: foyle.logs.LogsWaterMark.last_log_timestamp:type_name -> google.protobuf.Timestamp + 0, // 1: foyle.logs.GetLogsStatusResponse.watermark:type_name -> foyle.logs.LogsWaterMark + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_foyle_logs_logs_proto_init() } @@ -223,44 +251,6 @@ func file_foyle_logs_logs_proto_init() { if File_foyle_logs_logs_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_foyle_logs_logs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogsWaterMark); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_logs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLogsStatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_logs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLogsStatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/go/foyle/logs/logs.zap.go b/protos/go/foyle/logs/logs.zap.go index ccd5086..57d52c8 100644 --- a/protos/go/foyle/logs/logs.zap.go +++ b/protos/go/foyle/logs/logs.zap.go @@ -7,7 +7,9 @@ import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" + _ "google.golang.org/protobuf/types/known/timestamppb" go_uber_org_zap_zapcore "go.uber.org/zap/zapcore" + github_com_golang_protobuf_ptypes "github.com/golang/protobuf/ptypes" ) // Reference imports to suppress errors if they are not otherwise used. @@ -29,6 +31,11 @@ func (m *LogsWaterMark) MarshalLogObject(enc go_uber_org_zap_zapcore.ObjectEncod keyName = "offset" // field offset = 2 enc.AddInt64(keyName, m.Offset) + keyName = "last_log_timestamp" // field last_log_timestamp = 4 + if t, err := github_com_golang_protobuf_ptypes.Timestamp(m.LastLogTimestamp); err == nil { + enc.AddTime(keyName, t) + } + return nil } @@ -59,5 +66,8 @@ func (m *GetLogsStatusResponse) MarshalLogObject(enc go_uber_org_zap_zapcore.Obj } } + keyName = "last_log_timestamp_human" // field last_log_timestamp_human = 2 + enc.AddString(keyName, m.LastLogTimestampHuman) + return nil } diff --git a/protos/go/foyle/logs/sessions.pb.go b/protos/go/foyle/logs/sessions.pb.go index beb2832..9d84772 100644 --- a/protos/go/foyle/logs/sessions.pb.go +++ b/protos/go/foyle/logs/sessions.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/logs/sessions.proto @@ -47,11 +47,9 @@ type Session struct { func (x *Session) Reset() { *x = Session{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Session) String() string { @@ -62,7 +60,7 @@ func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -144,11 +142,9 @@ type GetSessionRequest struct { func (x *GetSessionRequest) Reset() { *x = GetSessionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionRequest) String() string { @@ -159,7 +155,7 @@ func (*GetSessionRequest) ProtoMessage() {} func (x *GetSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -192,11 +188,9 @@ type GetSessionResponse struct { func (x *GetSessionResponse) Reset() { *x = GetSessionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetSessionResponse) String() string { @@ -207,7 +201,7 @@ func (*GetSessionResponse) ProtoMessage() {} func (x *GetSessionResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,11 +231,9 @@ type ListSessionsRequest struct { func (x *ListSessionsRequest) Reset() { *x = ListSessionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsRequest) String() string { @@ -252,7 +244,7 @@ func (*ListSessionsRequest) ProtoMessage() {} func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,11 +270,9 @@ type ListSessionsResponse struct { func (x *ListSessionsResponse) Reset() { *x = ListSessionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListSessionsResponse) String() string { @@ -293,7 +283,7 @@ func (*ListSessionsResponse) ProtoMessage() {} func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -326,11 +316,9 @@ type DumpExamplesRequest struct { func (x *DumpExamplesRequest) Reset() { *x = DumpExamplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DumpExamplesRequest) String() string { @@ -341,7 +329,7 @@ func (*DumpExamplesRequest) ProtoMessage() {} func (x *DumpExamplesRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -376,11 +364,9 @@ type DumpExamplesResponse struct { func (x *DumpExamplesResponse) Reset() { *x = DumpExamplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_sessions_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_sessions_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DumpExamplesResponse) String() string { @@ -391,7 +377,7 @@ func (*DumpExamplesResponse) ProtoMessage() {} func (x *DumpExamplesResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_sessions_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -524,7 +510,7 @@ func file_foyle_logs_sessions_proto_rawDescGZIP() []byte { } var file_foyle_logs_sessions_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_foyle_logs_sessions_proto_goTypes = []interface{}{ +var file_foyle_logs_sessions_proto_goTypes = []any{ (*Session)(nil), // 0: foyle.logs.Session (*GetSessionRequest)(nil), // 1: foyle.logs.GetSessionRequest (*GetSessionResponse)(nil), // 2: foyle.logs.GetSessionResponse @@ -562,92 +548,6 @@ func file_foyle_logs_sessions_proto_init() { return } file_foyle_logs_blocks_proto_init() - if !protoimpl.UnsafeEnabled { - file_foyle_logs_sessions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Session); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_sessions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSessionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_sessions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSessionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_sessions_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSessionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_sessions_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSessionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_sessions_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpExamplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_sessions_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpExamplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/go/foyle/logs/sessions.zap.go b/protos/go/foyle/logs/sessions.zap.go index 3afa508..b7b244c 100644 --- a/protos/go/foyle/logs/sessions.zap.go +++ b/protos/go/foyle/logs/sessions.zap.go @@ -7,9 +7,9 @@ import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" + _ "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1" _ "google.golang.org/protobuf/types/known/timestamppb" _ "github.com/jlewi/foyle/protos/go/foyle/v1alpha1" - _ "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/runner/v1" go_uber_org_zap_zapcore "go.uber.org/zap/zapcore" github_com_golang_protobuf_ptypes "github.com/golang/protobuf/ptypes" ) diff --git a/protos/go/foyle/logs/traces.pb.go b/protos/go/foyle/logs/traces.pb.go index bee7ae3..a02352f 100644 --- a/protos/go/foyle/logs/traces.pb.go +++ b/protos/go/foyle/logs/traces.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/logs/traces.proto @@ -36,6 +36,7 @@ type Trace struct { // TODO(jeremy): Should these really be spans? // // Types that are assignable to Data: + // // *Trace_Generate Data isTrace_Data `protobuf_oneof:"data"` // Eval mode is true if the trace was generated in eval mode. @@ -48,11 +49,9 @@ type Trace struct { func (x *Trace) Reset() { *x = Trace{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Trace) String() string { @@ -63,7 +62,7 @@ func (*Trace) ProtoMessage() {} func (x *Trace) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,6 +150,7 @@ type Span struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Data: + // // *Span_Rag // *Span_Llm Data isSpan_Data `protobuf_oneof:"data"` @@ -158,11 +158,9 @@ type Span struct { func (x *Span) Reset() { *x = Span{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Span) String() string { @@ -173,7 +171,7 @@ func (*Span) ProtoMessage() {} func (x *Span) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,11 +241,9 @@ type RAGSpan struct { func (x *RAGSpan) Reset() { *x = RAGSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RAGSpan) String() string { @@ -258,7 +254,7 @@ func (*RAGSpan) ProtoMessage() {} func (x *RAGSpan) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +295,9 @@ type LLMSpan struct { func (x *LLMSpan) Reset() { *x = LLMSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LLMSpan) String() string { @@ -314,7 +308,7 @@ func (*LLMSpan) ProtoMessage() {} func (x *LLMSpan) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -361,11 +355,9 @@ type GenerateTrace struct { func (x *GenerateTrace) Reset() { *x = GenerateTrace{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateTrace) String() string { @@ -376,7 +368,7 @@ func (*GenerateTrace) ProtoMessage() {} func (x *GenerateTrace) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -417,11 +409,9 @@ type LogEntries struct { func (x *LogEntries) Reset() { *x = LogEntries{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEntries) String() string { @@ -432,7 +422,7 @@ func (*LogEntries) ProtoMessage() {} func (x *LogEntries) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -471,11 +461,9 @@ type GetTraceRequest struct { func (x *GetTraceRequest) Reset() { *x = GetTraceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTraceRequest) String() string { @@ -486,7 +474,7 @@ func (*GetTraceRequest) ProtoMessage() {} func (x *GetTraceRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -518,11 +506,9 @@ type GetTraceResponse struct { func (x *GetTraceResponse) Reset() { *x = GetTraceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetTraceResponse) String() string { @@ -533,7 +519,7 @@ func (*GetTraceResponse) ProtoMessage() {} func (x *GetTraceResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +551,9 @@ type GetBlockLogRequest struct { func (x *GetBlockLogRequest) Reset() { *x = GetBlockLogRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBlockLogRequest) String() string { @@ -580,7 +564,7 @@ func (*GetBlockLogRequest) ProtoMessage() {} func (x *GetBlockLogRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,11 +596,9 @@ type GetBlockLogResponse struct { func (x *GetBlockLogResponse) Reset() { *x = GetBlockLogResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetBlockLogResponse) String() string { @@ -627,7 +609,7 @@ func (*GetBlockLogResponse) ProtoMessage() {} func (x *GetBlockLogResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -663,11 +645,9 @@ type GetLLMLogsRequest struct { func (x *GetLLMLogsRequest) Reset() { *x = GetLLMLogsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLLMLogsRequest) String() string { @@ -678,7 +658,7 @@ func (*GetLLMLogsRequest) ProtoMessage() {} func (x *GetLLMLogsRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -724,11 +704,9 @@ type GetLLMLogsResponse struct { func (x *GetLLMLogsResponse) Reset() { *x = GetLLMLogsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_logs_traces_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_logs_traces_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetLLMLogsResponse) String() string { @@ -739,7 +717,7 @@ func (*GetLLMLogsResponse) ProtoMessage() {} func (x *GetLLMLogsResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_logs_traces_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -932,7 +910,7 @@ func file_foyle_logs_traces_proto_rawDescGZIP() []byte { } var file_foyle_logs_traces_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_foyle_logs_traces_proto_goTypes = []interface{}{ +var file_foyle_logs_traces_proto_goTypes = []any{ (*Trace)(nil), // 0: foyle.logs.Trace (*Span)(nil), // 1: foyle.logs.Span (*RAGSpan)(nil), // 2: foyle.logs.RAGSpan @@ -991,156 +969,10 @@ func file_foyle_logs_traces_proto_init() { } file_foyle_logs_logs_proto_init() file_foyle_logs_blocks_proto_init() - if !protoimpl.UnsafeEnabled { - file_foyle_logs_traces_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Trace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Span); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RAGSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LLMSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateTrace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEntries); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTraceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetTraceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockLogRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBlockLogResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLLMLogsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_logs_traces_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLLMLogsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_foyle_logs_traces_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_foyle_logs_traces_proto_msgTypes[0].OneofWrappers = []any{ (*Trace_Generate)(nil), } - file_foyle_logs_traces_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_foyle_logs_traces_proto_msgTypes[1].OneofWrappers = []any{ (*Span_Rag)(nil), (*Span_Llm)(nil), } diff --git a/protos/go/foyle/v1alpha1/agent.pb.go b/protos/go/foyle/v1alpha1/agent.pb.go index 47027a5..d268271 100644 --- a/protos/go/foyle/v1alpha1/agent.pb.go +++ b/protos/go/foyle/v1alpha1/agent.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/v1alpha1/agent.proto @@ -254,11 +254,9 @@ type GenerateRequest struct { func (x *GenerateRequest) Reset() { *x = GenerateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateRequest) String() string { @@ -269,7 +267,7 @@ func (*GenerateRequest) ProtoMessage() {} func (x *GenerateRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -309,11 +307,9 @@ type GenerateResponse struct { func (x *GenerateResponse) Reset() { *x = GenerateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateResponse) String() string { @@ -324,7 +320,7 @@ func (*GenerateResponse) ProtoMessage() {} func (x *GenerateResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,11 +359,9 @@ type ExecuteRequest struct { func (x *ExecuteRequest) Reset() { *x = ExecuteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteRequest) String() string { @@ -378,7 +372,7 @@ func (*ExecuteRequest) ProtoMessage() {} func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -410,11 +404,9 @@ type ExecuteResponse struct { func (x *ExecuteResponse) Reset() { *x = ExecuteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExecuteResponse) String() string { @@ -425,7 +417,7 @@ func (*ExecuteResponse) ProtoMessage() {} func (x *ExecuteResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,6 +448,7 @@ type StreamGenerateRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Request: + // // *StreamGenerateRequest_FullContext // *StreamGenerateRequest_Update Request isStreamGenerateRequest_Request `protobuf_oneof:"request"` @@ -470,11 +463,9 @@ type StreamGenerateRequest struct { func (x *StreamGenerateRequest) Reset() { *x = StreamGenerateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamGenerateRequest) String() string { @@ -485,7 +476,7 @@ func (*StreamGenerateRequest) ProtoMessage() {} func (x *StreamGenerateRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,11 +556,9 @@ type FullContext struct { func (x *FullContext) Reset() { *x = FullContext{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FullContext) String() string { @@ -580,7 +569,7 @@ func (*FullContext) ProtoMessage() {} func (x *FullContext) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -626,11 +615,9 @@ type UpdateContext struct { func (x *UpdateContext) Reset() { *x = UpdateContext{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UpdateContext) String() string { @@ -641,7 +628,7 @@ func (*UpdateContext) ProtoMessage() {} func (x *UpdateContext) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,11 +661,9 @@ type Finish struct { func (x *Finish) Reset() { *x = Finish{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Finish) String() string { @@ -689,7 +674,7 @@ func (*Finish) ProtoMessage() {} func (x *Finish) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -730,11 +715,9 @@ type StreamGenerateResponse struct { func (x *StreamGenerateResponse) Reset() { *x = StreamGenerateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StreamGenerateResponse) String() string { @@ -745,7 +728,7 @@ func (*StreamGenerateResponse) ProtoMessage() {} func (x *StreamGenerateResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -800,11 +783,9 @@ type GenerateCellsRequest struct { func (x *GenerateCellsRequest) Reset() { *x = GenerateCellsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateCellsRequest) String() string { @@ -815,7 +796,7 @@ func (*GenerateCellsRequest) ProtoMessage() {} func (x *GenerateCellsRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -854,11 +835,9 @@ type GenerateCellsResponse struct { func (x *GenerateCellsResponse) Reset() { *x = GenerateCellsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GenerateCellsResponse) String() string { @@ -869,7 +848,7 @@ func (*GenerateCellsResponse) ProtoMessage() {} func (x *GenerateCellsResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -899,11 +878,9 @@ type StatusRequest struct { func (x *StatusRequest) Reset() { *x = StatusRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatusRequest) String() string { @@ -914,7 +891,7 @@ func (*StatusRequest) ProtoMessage() {} func (x *StatusRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,11 +916,9 @@ type StatusResponse struct { func (x *StatusResponse) Reset() { *x = StatusResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StatusResponse) String() string { @@ -954,7 +929,7 @@ func (*StatusResponse) ProtoMessage() {} func (x *StatusResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -986,11 +961,9 @@ type GetExampleRequest struct { func (x *GetExampleRequest) Reset() { *x = GetExampleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExampleRequest) String() string { @@ -1001,7 +974,7 @@ func (*GetExampleRequest) ProtoMessage() {} func (x *GetExampleRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1033,11 +1006,9 @@ type GetExampleResponse struct { func (x *GetExampleResponse) Reset() { *x = GetExampleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetExampleResponse) String() string { @@ -1048,7 +1019,7 @@ func (*GetExampleResponse) ProtoMessage() {} func (x *GetExampleResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1080,11 +1051,9 @@ type LogEventsRequest struct { func (x *LogEventsRequest) Reset() { *x = LogEventsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEventsRequest) String() string { @@ -1095,7 +1064,7 @@ func (*LogEventsRequest) ProtoMessage() {} func (x *LogEventsRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1143,11 +1112,9 @@ type LogEvent struct { func (x *LogEvent) Reset() { *x = LogEvent{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEvent) String() string { @@ -1158,7 +1125,7 @@ func (*LogEvent) ProtoMessage() {} func (x *LogEvent) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1230,11 +1197,9 @@ type LogEventsResponse struct { func (x *LogEventsResponse) Reset() { *x = LogEventsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_agent_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_agent_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *LogEventsResponse) String() string { @@ -1245,7 +1210,7 @@ func (*LogEventsResponse) ProtoMessage() {} func (x *LogEventsResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_agent_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1442,7 +1407,7 @@ func file_foyle_v1alpha1_agent_proto_rawDescGZIP() []byte { var file_foyle_v1alpha1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_foyle_v1alpha1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_foyle_v1alpha1_agent_proto_goTypes = []interface{}{ +var file_foyle_v1alpha1_agent_proto_goTypes = []any{ (AIServiceStatus)(0), // 0: AIServiceStatus (LogEventType)(0), // 1: LogEventType (StreamGenerateRequest_Trigger)(0), // 2: StreamGenerateRequest.Trigger @@ -1519,225 +1484,7 @@ func file_foyle_v1alpha1_agent_proto_init() { } file_foyle_v1alpha1_doc_proto_init() file_foyle_v1alpha1_trainer_proto_init() - if !protoimpl.UnsafeEnabled { - file_foyle_v1alpha1_agent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamGenerateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FullContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Finish); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StreamGenerateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateCellsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenerateCellsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExampleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetExampleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEventsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEvent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEventsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_foyle_v1alpha1_agent_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_foyle_v1alpha1_agent_proto_msgTypes[4].OneofWrappers = []any{ (*StreamGenerateRequest_FullContext)(nil), (*StreamGenerateRequest_Update)(nil), } diff --git a/protos/go/foyle/v1alpha1/doc.pb.go b/protos/go/foyle/v1alpha1/doc.pb.go index 239bceb..6c76715 100644 --- a/protos/go/foyle/v1alpha1/doc.pb.go +++ b/protos/go/foyle/v1alpha1/doc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/v1alpha1/doc.proto @@ -81,11 +81,9 @@ type Doc struct { func (x *Doc) Reset() { *x = Doc{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_doc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_doc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Doc) String() string { @@ -96,7 +94,7 @@ func (*Doc) ProtoMessage() {} func (x *Doc) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_doc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,11 +149,9 @@ type Block struct { func (x *Block) Reset() { *x = Block{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_doc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_doc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Block) String() string { @@ -166,7 +162,7 @@ func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_doc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -244,11 +240,9 @@ type BlockOutput struct { func (x *BlockOutput) Reset() { *x = BlockOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_doc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_doc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockOutput) String() string { @@ -259,7 +253,7 @@ func (*BlockOutput) ProtoMessage() {} func (x *BlockOutput) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_doc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -299,11 +293,9 @@ type BlockOutputItem struct { func (x *BlockOutputItem) Reset() { *x = BlockOutputItem{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_doc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_doc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BlockOutputItem) String() string { @@ -314,7 +306,7 @@ func (*BlockOutputItem) ProtoMessage() {} func (x *BlockOutputItem) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_doc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,7 +395,7 @@ func file_foyle_v1alpha1_doc_proto_rawDescGZIP() []byte { var file_foyle_v1alpha1_doc_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_foyle_v1alpha1_doc_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_foyle_v1alpha1_doc_proto_goTypes = []interface{}{ +var file_foyle_v1alpha1_doc_proto_goTypes = []any{ (BlockKind)(0), // 0: BlockKind (*Doc)(nil), // 1: Doc (*Block)(nil), // 2: Block @@ -429,56 +421,6 @@ func file_foyle_v1alpha1_doc_proto_init() { if File_foyle_v1alpha1_doc_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_foyle_v1alpha1_doc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Doc); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_doc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Block); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_doc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_doc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockOutputItem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/go/foyle/v1alpha1/eval.pb.go b/protos/go/foyle/v1alpha1/eval.pb.go index 3f9fe45..e1e4e45 100644 --- a/protos/go/foyle/v1alpha1/eval.pb.go +++ b/protos/go/foyle/v1alpha1/eval.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/v1alpha1/eval.proto @@ -328,11 +328,9 @@ type EvalResult struct { func (x *EvalResult) Reset() { *x = EvalResult{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvalResult) String() string { @@ -343,7 +341,7 @@ func (*EvalResult) ProtoMessage() {} func (x *EvalResult) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,11 +452,9 @@ type Assertion struct { func (x *Assertion) Reset() { *x = Assertion{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Assertion) String() string { @@ -469,7 +465,7 @@ func (*Assertion) ProtoMessage() {} func (x *Assertion) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,11 +519,9 @@ type EvalResultListRequest struct { func (x *EvalResultListRequest) Reset() { *x = EvalResultListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvalResultListRequest) String() string { @@ -538,7 +532,7 @@ func (*EvalResultListRequest) ProtoMessage() {} func (x *EvalResultListRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -570,11 +564,9 @@ type EvalResultListResponse struct { func (x *EvalResultListResponse) Reset() { *x = EvalResultListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvalResultListResponse) String() string { @@ -585,7 +577,7 @@ func (*EvalResultListResponse) ProtoMessage() {} func (x *EvalResultListResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -629,11 +621,9 @@ type AssertionRow struct { func (x *AssertionRow) Reset() { *x = AssertionRow{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssertionRow) String() string { @@ -644,7 +634,7 @@ func (*AssertionRow) ProtoMessage() {} func (x *AssertionRow) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -719,11 +709,9 @@ type AssertionTableRequest struct { func (x *AssertionTableRequest) Reset() { *x = AssertionTableRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssertionTableRequest) String() string { @@ -734,7 +722,7 @@ func (*AssertionTableRequest) ProtoMessage() {} func (x *AssertionTableRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -776,11 +764,9 @@ type EvalExample struct { func (x *EvalExample) Reset() { *x = EvalExample{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EvalExample) String() string { @@ -791,7 +777,7 @@ func (*EvalExample) ProtoMessage() {} func (x *EvalExample) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -844,11 +830,9 @@ type AssertionTableResponse struct { func (x *AssertionTableResponse) Reset() { *x = AssertionTableResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssertionTableResponse) String() string { @@ -859,7 +843,7 @@ func (*AssertionTableResponse) ProtoMessage() {} func (x *AssertionTableResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,11 +876,9 @@ type GetEvalResultRequest struct { func (x *GetEvalResultRequest) Reset() { *x = GetEvalResultRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvalResultRequest) String() string { @@ -907,7 +889,7 @@ func (*GetEvalResultRequest) ProtoMessage() {} func (x *GetEvalResultRequest) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -939,11 +921,9 @@ type GetEvalResultResponse struct { func (x *GetEvalResultResponse) Reset() { *x = GetEvalResultResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetEvalResultResponse) String() string { @@ -954,7 +934,7 @@ func (*GetEvalResultResponse) ProtoMessage() {} func (x *GetEvalResultResponse) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -995,11 +975,9 @@ type ExperimentReport struct { func (x *ExperimentReport) Reset() { *x = ExperimentReport{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExperimentReport) String() string { @@ -1010,7 +988,7 @@ func (*ExperimentReport) ProtoMessage() {} func (x *ExperimentReport) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1081,11 +1059,9 @@ type AssertionCounts struct { func (x *AssertionCounts) Reset() { *x = AssertionCounts{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AssertionCounts) String() string { @@ -1096,7 +1072,7 @@ func (*AssertionCounts) ProtoMessage() {} func (x *AssertionCounts) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1160,11 +1136,9 @@ type PercentileStat struct { func (x *PercentileStat) Reset() { *x = PercentileStat{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_eval_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_eval_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PercentileStat) String() string { @@ -1175,7 +1149,7 @@ func (*PercentileStat) ProtoMessage() {} func (x *PercentileStat) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_eval_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1421,7 +1395,7 @@ func file_foyle_v1alpha1_eval_proto_rawDescGZIP() []byte { var file_foyle_v1alpha1_eval_proto_enumTypes = make([]protoimpl.EnumInfo, 5) var file_foyle_v1alpha1_eval_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_foyle_v1alpha1_eval_proto_goTypes = []interface{}{ +var file_foyle_v1alpha1_eval_proto_goTypes = []any{ (EvalResultStatus)(0), // 0: EvalResultStatus (AssertResult)(0), // 1: AssertResult (CellsMatchResult)(0), // 2: CellsMatchResult @@ -1489,164 +1463,6 @@ func file_foyle_v1alpha1_eval_proto_init() { file_foyle_v1alpha1_agent_proto_init() file_foyle_v1alpha1_doc_proto_init() file_foyle_v1alpha1_trainer_proto_init() - if !protoimpl.UnsafeEnabled { - file_foyle_v1alpha1_eval_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Assertion); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalResultListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalResultListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssertionRow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssertionTableRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EvalExample); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssertionTableResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEvalResultRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetEvalResultResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExperimentReport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssertionCounts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_eval_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PercentileStat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/protos/go/foyle/v1alpha1/eval.zap.go b/protos/go/foyle/v1alpha1/eval.zap.go index ee19db7..79691f3 100644 --- a/protos/go/foyle/v1alpha1/eval.zap.go +++ b/protos/go/foyle/v1alpha1/eval.zap.go @@ -7,9 +7,9 @@ import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" + _ "google.golang.org/protobuf/types/known/structpb" _ "github.com/stateful/runme/v3/pkg/api/gen/proto/go/runme/parser/v1" _ "google.golang.org/protobuf/types/known/timestamppb" - _ "google.golang.org/protobuf/types/known/structpb" go_uber_org_zap_zapcore "go.uber.org/zap/zapcore" github_com_golang_protobuf_ptypes "github.com/golang/protobuf/ptypes" ) diff --git a/protos/go/foyle/v1alpha1/providers.pb.go b/protos/go/foyle/v1alpha1/providers.pb.go index 19c188a..437a5e6 100644 --- a/protos/go/foyle/v1alpha1/providers.pb.go +++ b/protos/go/foyle/v1alpha1/providers.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/v1alpha1/providers.proto @@ -103,7 +103,7 @@ func file_foyle_v1alpha1_providers_proto_rawDescGZIP() []byte { } var file_foyle_v1alpha1_providers_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_foyle_v1alpha1_providers_proto_goTypes = []interface{}{ +var file_foyle_v1alpha1_providers_proto_goTypes = []any{ (ModelProvider)(0), // 0: ModelProvider } var file_foyle_v1alpha1_providers_proto_depIdxs = []int32{ diff --git a/protos/go/foyle/v1alpha1/trainer.pb.go b/protos/go/foyle/v1alpha1/trainer.pb.go index b7153bb..0d84617 100644 --- a/protos/go/foyle/v1alpha1/trainer.pb.go +++ b/protos/go/foyle/v1alpha1/trainer.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.35.2 // protoc (unknown) // source: foyle/v1alpha1/trainer.proto @@ -36,11 +36,9 @@ type Example struct { func (x *Example) Reset() { *x = Example{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_trainer_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_trainer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Example) String() string { @@ -51,7 +49,7 @@ func (*Example) ProtoMessage() {} func (x *Example) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_trainer_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -105,11 +103,9 @@ type RAGResult struct { func (x *RAGResult) Reset() { *x = RAGResult{} - if protoimpl.UnsafeEnabled { - mi := &file_foyle_v1alpha1_trainer_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_foyle_v1alpha1_trainer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RAGResult) String() string { @@ -120,7 +116,7 @@ func (*RAGResult) ProtoMessage() {} func (x *RAGResult) ProtoReflect() protoreflect.Message { mi := &file_foyle_v1alpha1_trainer_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,7 +185,7 @@ func file_foyle_v1alpha1_trainer_proto_rawDescGZIP() []byte { } var file_foyle_v1alpha1_trainer_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_foyle_v1alpha1_trainer_proto_goTypes = []interface{}{ +var file_foyle_v1alpha1_trainer_proto_goTypes = []any{ (*Example)(nil), // 0: Example (*RAGResult)(nil), // 1: RAGResult (*Doc)(nil), // 2: Doc @@ -212,32 +208,6 @@ func file_foyle_v1alpha1_trainer_proto_init() { return } file_foyle_v1alpha1_doc_proto_init() - if !protoimpl.UnsafeEnabled { - file_foyle_v1alpha1_trainer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Example); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_foyle_v1alpha1_trainer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RAGResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{