diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d3c62d2..0da862f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: - name: Run Gosec Security Scanner uses: securego/gosec@master with: - args: -exclude=G115 ./... + args: -exclude=G115 -exclude-generated ./... - name: Build run: go build -v ./... diff --git a/connectors/common/base.go b/connectors/common/base.go index 34ae579e..e532face 100644 --- a/connectors/common/base.go +++ b/connectors/common/base.go @@ -42,6 +42,10 @@ type Teardownable interface { Teardown() } +type OnTaskCompletionBarrierHandlerServicable interface { + OnTaskCompletionBarrierHandler(uint) error +} + type ConnectorSettings struct { NumParallelCopiers int NumParallelWriters int @@ -623,6 +627,7 @@ func (c *connector) StartReadToChannel(flowId iface.FlowID, options iface.Connec DataBatch: r.GetData(), MutationType: iface.MutationType_InsertBatch, Loc: destNs, + TaskId: uint(task.Id), } dataChannel <- dataMessage } @@ -635,6 +640,7 @@ func (c *connector) StartReadToChannel(flowId iface.FlowID, options iface.Connec DataBatch: transformed.Msg.GetData(), MutationType: iface.MutationType_InsertBatch, Loc: destNs, + TaskId: uint(task.Id), } dataChannel <- dataMessage } @@ -643,6 +649,7 @@ func (c *connector) StartReadToChannel(flowId iface.FlowID, options iface.Connec DataBatch: data, MutationType: iface.MutationType_InsertBatch, Loc: destinationNamespace, + TaskId: uint(task.Id), } dataChannel <- dataMessage } @@ -978,6 +985,14 @@ func (c *connector) HandlerError(err error) error { func (c *connector) HandleBarrierMessage(barrierMsg iface.DataMessage) error { switch barrierMsg.BarrierType { case iface.BarrierType_TaskComplete: + // Call the optional OnTaskCompletionBarrier hook if implemented + if onTaskCompletionBarrierHandlerServicable, ok := c.maybeOptimizedImpl.(OnTaskCompletionBarrierHandlerServicable); ok { + err := onTaskCompletionBarrierHandlerServicable.OnTaskCompletionBarrierHandler(barrierMsg.BarrierTaskId) + if err != nil { + return err + } + } + // notify the coordinator that the task is done from our side if err := c.coord.NotifyTaskDone(c.flowID, c.id, (iface.ReadPlanTaskID)(barrierMsg.BarrierTaskId), nil); err != nil { return err @@ -1080,6 +1095,7 @@ func (c *connector) ProcessDataMessages(dataMsgs []iface.DataMessage) error { Namespace: dataMsg.Loc, Data: dataMsg.DataBatch, Type: c.settings.DestinationDataType, + TaskId: uint32(dataMsg.TaskId), })) if err != nil { return err diff --git a/connectors/s3/connector.go b/connectors/s3/connector.go new file mode 100644 index 00000000..97ebed91 --- /dev/null +++ b/connectors/s3/connector.go @@ -0,0 +1,657 @@ +/* + * Copyright (C) 2025 Adiom, Inc. + * + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +package s3 + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "log/slog" + "path" + "strings" + "sync" + + "connectrpc.com/connect" + adiomv1 "github.com/adiom-data/dsync/gen/adiom/v1" + "github.com/adiom-data/dsync/gen/adiom/v1/adiomv1connect" + "github.com/aws/aws-sdk-go-v2/aws" + awsconfig "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/credentials" + "github.com/aws/aws-sdk-go-v2/service/s3" + "github.com/aws/smithy-go" + "go.mongodb.org/mongo-driver/bson" +) + +var ( + ErrBucketRequired = errors.New("bucket is required") + ErrRegionRequired = errors.New("region is required") + ErrUnsupportedType = errors.New("unsupported data type for S3 connector") +) + +// ConnectorSettings configures the S3 connector. +type ConnectorSettings struct { + Uri string + Bucket string + Region string + OutputFormat string + Prefix string + Endpoint string + Profile string + AccessKeyID string + SecretAccessKey string + SessionToken string + UsePathStyle bool + PrettyJSON bool +} + +type taskKey struct { + taskID uint +} + +type storedBatch struct { + namespace string + docs [][]byte +} + +type connector struct { + adiomv1connect.UnimplementedConnectorServiceHandler + + client *s3.Client + settings ConnectorSettings + batchesMutex sync.Mutex + batches map[taskKey]*storedBatch + + metadataMutex sync.Mutex // Serialize metadata updates + + errMutex sync.RWMutex + err error +} + +func parseS3ConnectionString(raw string) (string, string, error) { + const prefix = "s3://" + if !strings.HasPrefix(strings.ToLower(raw), prefix) { + return "", "", fmt.Errorf("invalid s3 connection string %q", raw) + } + path := raw[len(prefix):] + if path == "" { + return "", "", fmt.Errorf("missing bucket in %q", raw) + } + parts := strings.SplitN(path, "/", 2) + bucket := parts[0] + var keyPrefix string + if len(parts) == 2 { + keyPrefix = parts[1] + } + return bucket, keyPrefix, nil +} + +// NewConn creates a new S3 sink connector. +func NewConn(settings ConnectorSettings) (adiomv1connect.ConnectorServiceHandler, error) { + bucket, prefix, err := parseS3ConnectionString(settings.Uri) + if err != nil { + return nil, fmt.Errorf("bad uri format %v", settings.Uri) + } + settings.Bucket = bucket + // Combine URI prefix with flag-provided prefix + if settings.Prefix == "" { + settings.Prefix = prefix + } else if prefix != "" { + // Append flag prefix to URI prefix + settings.Prefix = path.Join(prefix, settings.Prefix) + } + // If flag is set and URI has no prefix, use flag value (already set) + + if settings.Bucket == "" { + return nil, ErrBucketRequired + } + if settings.Region == "" { + return nil, ErrRegionRequired + } + if settings.OutputFormat == "" { + settings.OutputFormat = "json" + } + + if !strings.EqualFold(settings.OutputFormat, "json") { + return nil, fmt.Errorf("unsupported output format %q", settings.OutputFormat) + } + + cfgOpts := []func(*awsconfig.LoadOptions) error{ + awsconfig.WithRegion(settings.Region), + } + if settings.Profile != "" { + cfgOpts = append(cfgOpts, awsconfig.WithSharedConfigProfile(settings.Profile)) + } + if settings.AccessKeyID != "" && settings.SecretAccessKey != "" { + static := credentials.NewStaticCredentialsProvider(settings.AccessKeyID, settings.SecretAccessKey, settings.SessionToken) + cfgOpts = append(cfgOpts, awsconfig.WithCredentialsProvider(static)) + } + cfg, err := awsconfig.LoadDefaultConfig(context.Background(), cfgOpts...) + if err != nil { + return nil, fmt.Errorf("load aws config: %w", err) + } + + client := s3.NewFromConfig(cfg, func(o *s3.Options) { + if settings.Endpoint != "" { + o.BaseEndpoint = aws.String(settings.Endpoint) + } + if settings.UsePathStyle { + o.UsePathStyle = true + } + }) + + return &connector{ + client: client, + settings: settings, + batches: make(map[taskKey]*storedBatch), + }, nil +} + +// GetInfo implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) GetInfo(context.Context, *connect.Request[adiomv1.GetInfoRequest]) (*connect.Response[adiomv1.GetInfoResponse], error) { + return connect.NewResponse(&adiomv1.GetInfoResponse{ + DbType: "s3", + Capabilities: &adiomv1.Capabilities{ + Source: &adiomv1.Capabilities_Source{ + SupportedDataTypes: []adiomv1.DataType{ + adiomv1.DataType_DATA_TYPE_JSON_ID, + adiomv1.DataType_DATA_TYPE_MONGO_BSON, + }, + LsnStream: false, + MultiNamespacePlan: true, + DefaultPlan: true, + }, + Sink: &adiomv1.Capabilities_Sink{ + SupportedDataTypes: []adiomv1.DataType{ + adiomv1.DataType_DATA_TYPE_MONGO_BSON, + adiomv1.DataType_DATA_TYPE_JSON_ID, + }, + }, + }, + }), nil +} + +// GeneratePlan implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) GeneratePlan(ctx context.Context, req *connect.Request[adiomv1.GeneratePlanRequest]) (*connect.Response[adiomv1.GeneratePlanResponse], error) { + input := &s3.ListObjectsV2Input{ + Bucket: aws.String(c.settings.Bucket), + } + + basePrefix := strings.Trim(c.settings.Prefix, "/") + if basePrefix != "" { + // Ensure we only list under the configured prefix + basePrefix = basePrefix + "/" + input.Prefix = aws.String(basePrefix) + } + + paginator := s3.NewListObjectsV2Paginator(c.client, input) + + // If namespaces are specified, only include tasks for those namespaces. + // If none are specified, include all discovered namespaces. + requestedNamespaces := map[string]struct{}{} + for _, ns := range req.Msg.GetNamespaces() { + ns = strings.TrimSpace(ns) + if ns == "" { + continue + } + requestedNamespaces[ns] = struct{}{} + } + filterByNamespace := len(requestedNamespaces) > 0 + + var partitions []*adiomv1.Partition + // Track which namespaces we've seen to load metadata once per namespace + namespaceMetadataCache := make(map[string]map[string]uint64) + + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("list objects: %w", err)) + } + + for _, obj := range page.Contents { + key := aws.ToString(obj.Key) + // Only treat JSON files as tasks (skip metadata files) + if !strings.HasSuffix(strings.ToLower(key), ".json") { + continue + } + // Skip metadata files + if strings.HasSuffix(key, ".metadata.json") { + continue + } + + relKey := key + if basePrefix != "" { + relKey = strings.TrimPrefix(relKey, basePrefix) + } + relKey = strings.TrimPrefix(relKey, "/") + if relKey == "" { + continue + } + + parts := strings.SplitN(relKey, "/", 2) + namespace := "" + if len(parts) > 1 { + namespace = parts[0] + } + if namespace == "" { + namespace = "default" + } + + if filterByNamespace { + if _, ok := requestedNamespaces[namespace]; !ok { + continue + } + } + + // Load metadata for this namespace if not already cached + if _, ok := namespaceMetadataCache[namespace]; !ok { + metadata, err := c.readMetadata(ctx, namespace) + if err != nil { + slog.Warn("failed to read metadata file for namespace, using default count", "namespace", namespace, "err", err) + } + if metadata == nil { + slog.Warn("metadata file not found for namespace, using default count", "namespace", namespace) + } + namespaceMetadataCache[namespace] = metadata + } + + // Get estimated count from metadata + estimatedCount := uint64(0) + if namespaceMetadataCache[namespace] != nil { + fileName := path.Base(key) + if count, ok := namespaceMetadataCache[namespace][fileName]; ok { + estimatedCount = count + } + } + + partitions = append(partitions, &adiomv1.Partition{ + Namespace: namespace, + Cursor: []byte(key), // Use the S3 object key as the partition cursor + EstimatedCount: estimatedCount, + }) + } + } + + return connect.NewResponse(&adiomv1.GeneratePlanResponse{ + Partitions: partitions, + // Updates are not supported for S3 JSON source + UpdatesPartitions: nil, + }), nil +} + +// GetNamespaceMetadata implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) GetNamespaceMetadata(ctx context.Context, req *connect.Request[adiomv1.GetNamespaceMetadataRequest]) (*connect.Response[adiomv1.GetNamespaceMetadataResponse], error) { + namespace := req.Msg.GetNamespace() + if namespace == "" { + namespace = "default" + } + + // Read metadata file for the namespace + metadata, err := c.readMetadata(ctx, namespace) + if err != nil { + slog.Warn("failed to read metadata file for namespace, using default count", "namespace", namespace, "err", err) + return connect.NewResponse(&adiomv1.GetNamespaceMetadataResponse{ + Count: 0, + }), nil + } + + if metadata == nil { + slog.Warn("metadata file not found for namespace, using default count", "namespace", namespace) + return connect.NewResponse(&adiomv1.GetNamespaceMetadataResponse{ + Count: 0, + }), nil + } + + // Sum up all record counts from the metadata + var totalCount uint64 + for _, count := range metadata { + totalCount += count + } + + return connect.NewResponse(&adiomv1.GetNamespaceMetadataResponse{ + Count: totalCount, + }), nil +} + +// ListData implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) ListData(ctx context.Context, req *connect.Request[adiomv1.ListDataRequest]) (*connect.Response[adiomv1.ListDataResponse], error) { + part := req.Msg.GetPartition() + if part == nil || len(part.GetCursor()) == 0 { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("partition cursor (S3 object key) is required")) + } + + key := string(part.GetCursor()) + getOut, err := c.client.GetObject(ctx, &s3.GetObjectInput{ + Bucket: aws.String(c.settings.Bucket), + Key: aws.String(key), + }) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("get object %s: %w", key, err)) + } + defer getOut.Body.Close() + + var data [][]byte + switch req.Msg.GetType() { + case adiomv1.DataType_DATA_TYPE_JSON_ID: + var rawDocs []json.RawMessage + if err := json.NewDecoder(getOut.Body).Decode(&rawDocs); err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("decode json array from %s: %w", key, err)) + } + for _, d := range rawDocs { + if !json.Valid(d) { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("invalid json element in %s", key)) + } + data = append(data, append([]byte(nil), d...)) + } + case adiomv1.DataType_DATA_TYPE_MONGO_BSON: + var rawDocs []json.RawMessage + if err := json.NewDecoder(getOut.Body).Decode(&rawDocs); err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("decode json array from %s: %w", key, err)) + } + for _, d := range rawDocs { + // Convert JSON to BSON + var doc map[string]interface{} + if err := json.Unmarshal(d, &doc); err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("unmarshal json to map in %s: %w", key, err)) + } + bsonDoc, err := bson.Marshal(doc) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, fmt.Errorf("marshal map to bson in %s: %w", key, err)) + } + data = append(data, bsonDoc) + } + default: + return nil, connect.NewError(connect.CodeInvalidArgument, ErrUnsupportedType) + } + + return connect.NewResponse(&adiomv1.ListDataResponse{ + Data: data, + NextCursor: nil, + }), nil +} + +// StreamLSN implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) StreamLSN(context.Context, *connect.Request[adiomv1.StreamLSNRequest], *connect.ServerStream[adiomv1.StreamLSNResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.ErrUnsupported) +} + +// StreamUpdates implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) StreamUpdates(context.Context, *connect.Request[adiomv1.StreamUpdatesRequest], *connect.ServerStream[adiomv1.StreamUpdatesResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.ErrUnsupported) +} + +// WriteData implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) WriteData(ctx context.Context, req *connect.Request[adiomv1.WriteDataRequest]) (*connect.Response[adiomv1.WriteDataResponse], error) { + if err := c.currentError(); err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + slog.Debug("received write data request", "namespace", req.Msg.GetNamespace(), "taskId", req.Msg.GetTaskId(), "numDocs", len(req.Msg.GetData())) + + taskID := uint(req.Msg.GetTaskId()) + if taskID == 0 { + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("task id is required")) + } + + if len(req.Msg.GetData()) == 0 { + return connect.NewResponse(&adiomv1.WriteDataResponse{}), nil + } + + jsonDocs := make([][]byte, 0, len(req.Msg.GetData())) + for _, doc := range req.Msg.GetData() { + converted, err := convertToJSON(doc, req.Msg.GetType()) + if err != nil { + return nil, connect.NewError(connect.CodeInvalidArgument, err) + } + jsonDocs = append(jsonDocs, converted) + } + c.appendBatch(req.Msg.GetNamespace(), taskID, jsonDocs) + + return connect.NewResponse(&adiomv1.WriteDataResponse{}), nil +} + +// WriteUpdates implements adiomv1connect.ConnectorServiceHandler. +func (c *connector) WriteUpdates(context.Context, *connect.Request[adiomv1.WriteUpdatesRequest]) (*connect.Response[adiomv1.WriteUpdatesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, fmt.Errorf("updates not supported by S3 connector")) +} + +// OnTaskCompletionBarrierHandler flushes buffered data to S3 and updates metadata. +func (c *connector) OnTaskCompletionBarrierHandler(taskID uint) error { + batch := c.detachBatch(taskID) + if batch == nil { + slog.Debug("s3 connector received barrier with no data", "taskId", taskID) + return nil + } + if len(batch.docs) == 0 { + slog.Debug("s3 connector received barrier with empty batch", "taskId", taskID) + return nil + } + if err := c.flushBatch(batch.namespace, taskID, batch.docs); err != nil { + slog.Error("failed to flush s3 batch", "namespace", batch.namespace, "taskId", taskID, "err", err) + c.setError(err) + return err + } + + // Update metadata file atomically after successful flush + if len(batch.docs) > 0 { + if err := c.updateMetadataAfterFlush(context.Background(), batch.namespace, taskID, uint64(len(batch.docs))); err != nil { + slog.Error("failed to update metadata", "namespace", batch.namespace, "taskId", taskID, "err", err) + // Log error but don't fail the barrier - the data was successfully flushed + } + } + + return nil +} + +func (c *connector) appendBatch(namespace string, taskID uint, docs [][]byte) { + c.batchesMutex.Lock() + defer c.batchesMutex.Unlock() + key := taskKey{taskID} + batch, ok := c.batches[key] + if !ok { + batch = &storedBatch{namespace: namespace} + c.batches[key] = batch + } + batch.docs = append(batch.docs, docs...) +} + +func (c *connector) detachBatch(taskID uint) *storedBatch { + c.batchesMutex.Lock() + defer c.batchesMutex.Unlock() + key := taskKey{taskID} + batch := c.batches[key] + delete(c.batches, key) + return batch +} + +func (c *connector) flushBatch(namespace string, taskID uint, docs [][]byte) error { + payload := buildJSONArray(docs, c.settings.PrettyJSON) + key := c.objectKey(namespace, taskID) + _, err := c.client.PutObject(context.Background(), &s3.PutObjectInput{ + Bucket: aws.String(c.settings.Bucket), + Key: aws.String(key), + Body: bytes.NewReader(payload), + ContentType: aws.String("application/json"), + }) + if err != nil { + return fmt.Errorf("put object %s: %w", key, err) + } + slog.Debug("flushed s3 batch", "namespace", namespace, "taskId", taskID, "key", key, "numDocs", len(docs)) + return nil +} + +func (c *connector) objectKey(namespace string, taskID uint) string { + nsPath := strings.ReplaceAll(strings.Trim(namespace, "/"), ".", "/") + if nsPath == "" { + nsPath = "default" + } + fileName := fmt.Sprintf("task-%d.json", taskID) + + prefix := strings.Trim(c.settings.Prefix, "/") + if prefix == "" { + return path.Join(nsPath, fileName) + } + return path.Join(prefix, nsPath, fileName) +} + +func (c *connector) currentError() error { + c.errMutex.RLock() + defer c.errMutex.RUnlock() + return c.err +} + +func (c *connector) setError(err error) { + c.errMutex.Lock() + defer c.errMutex.Unlock() + if c.err == nil { + c.err = err + } +} + +func buildJSONArray(docs [][]byte, prettyJSON bool) []byte { + var buf bytes.Buffer + buf.Grow(len(docs) * 2) + buf.WriteByte('[') + for i, doc := range docs { + if i > 0 { + buf.WriteByte(',') + } + if prettyJSON { + var prettyBuf bytes.Buffer + prettyBuf.Grow(len(doc) + len(doc)/10) // rough estimate + if err := json.Indent(&prettyBuf, doc, "", " "); err == nil { + buf.WriteByte('\n') + doc = prettyBuf.Bytes() + } else { + // If indenting fails, fall back to original + slog.Warn("Failed JSON indentation. Falling back to no-indent") + } + } + buf.Write(doc) + } + if prettyJSON { + buf.WriteByte('\n') + } + buf.WriteByte(']') + return buf.Bytes() +} + +func convertToJSON(data []byte, dataType adiomv1.DataType) ([]byte, error) { + switch dataType { + case adiomv1.DataType_DATA_TYPE_JSON_ID: + if !json.Valid(data) { + return nil, fmt.Errorf("invalid json payload") + } + return append([]byte(nil), data...), nil + case adiomv1.DataType_DATA_TYPE_MONGO_BSON: + var doc map[string]any + if err := bson.Unmarshal(data, &doc); err != nil { + return nil, fmt.Errorf("bson to json: %w", err) + } + converted, err := json.Marshal(doc) + if err != nil { + return nil, fmt.Errorf("marshal json: %w", err) + } + return converted, nil + default: + return nil, ErrUnsupportedType + } +} + +// metadataKey returns the S3 key for the metadata file for a given namespace. +func (c *connector) metadataKey(namespace string) string { + nsPath := strings.ReplaceAll(strings.Trim(namespace, "/"), ".", "/") + if nsPath == "" { + nsPath = "default" + } + + prefix := strings.Trim(c.settings.Prefix, "/") + if prefix == "" { + return path.Join(nsPath, ".metadata.json") + } + return path.Join(prefix, nsPath, ".metadata.json") +} + +// readMetadata reads the metadata.json file for a namespace from S3. +// Returns nil, nil if the file doesn't exist. +func (c *connector) readMetadata(ctx context.Context, namespace string) (map[string]uint64, error) { + key := c.metadataKey(namespace) + getOut, err := c.client.GetObject(ctx, &s3.GetObjectInput{ + Bucket: aws.String(c.settings.Bucket), + Key: aws.String(key), + }) + if err != nil { + // Check if it's a "NoSuchKey" error - this is expected if metadata file doesn't exist yet + var apiErr smithy.APIError + if errors.As(err, &apiErr) { + // Check for NoSuchKey error code (used by S3) + if apiErr.ErrorCode() == "NoSuchKey" { + return nil, nil + } + } + return nil, fmt.Errorf("get metadata object %s: %w", key, err) + } + defer getOut.Body.Close() + + var metadata map[string]uint64 + if err := json.NewDecoder(getOut.Body).Decode(&metadata); err != nil { + return nil, fmt.Errorf("decode metadata json from %s: %w", key, err) + } + return metadata, nil +} + +// writeMetadata atomically writes the metadata.json file for a namespace to S3. +func (c *connector) writeMetadata(ctx context.Context, namespace string, metadata map[string]uint64) error { + key := c.metadataKey(namespace) + metadataJSON, err := json.Marshal(metadata) + if err != nil { + return fmt.Errorf("marshal metadata json: %w", err) + } + + _, err = c.client.PutObject(ctx, &s3.PutObjectInput{ + Bucket: aws.String(c.settings.Bucket), + Key: aws.String(key), + Body: bytes.NewReader(metadataJSON), + ContentType: aws.String("application/json"), + }) + if err != nil { + return fmt.Errorf("put metadata object %s: %w", key, err) + } + return nil +} + +// updateMetadataAfterFlush updates the metadata file after a batch has been flushed. +// It reads the current metadata, adds/updates the file entry, and writes it back atomically. +func (c *connector) updateMetadataAfterFlush(ctx context.Context, namespace string, taskID uint, recordCount uint64) error { + c.metadataMutex.Lock() + defer c.metadataMutex.Unlock() + + // Read current metadata (or create empty map if doesn't exist) + metadata, err := c.readMetadata(ctx, namespace) + if err != nil { + return fmt.Errorf("read metadata: %w", err) + } + if metadata == nil { + metadata = make(map[string]uint64) + } + + // Get the file key that was just written + fileKey := c.objectKey(namespace, taskID) + // Extract just the filename for the metadata map + // The metadata should map filename -> record count + fileName := path.Base(fileKey) + + // Update the metadata with the new file and record count + metadata[fileName] = recordCount + + // Write back atomically + if err := c.writeMetadata(ctx, namespace, metadata); err != nil { + return fmt.Errorf("write metadata: %w", err) + } + + return nil +} diff --git a/gen/adiom/v1/adiom.pb.go b/gen/adiom/v1/adiom.pb.go index 582ccaf2..39acbab6 100644 --- a/gen/adiom/v1/adiom.pb.go +++ b/gen/adiom/v1/adiom.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: adiom/v1/adiom.proto @@ -10,6 +10,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" + unsafe "unsafe" ) const ( @@ -21,68 +22,21 @@ const ( var File_adiom_v1_adiom_proto protoreflect.FileDescriptor -var file_adiom_v1_adiom_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x1a, 0x17, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xfc, 0x04, 0x0a, 0x10, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, - 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x61, 0x64, 0x69, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, - 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1a, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x61, 0x64, - 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x64, 0x69, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x1d, 0x2e, 0x61, 0x64, 0x69, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c, - 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x64, 0x69, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x4c, 0x69, 0x73, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x2e, - 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x46, 0x0a, 0x09, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x53, 0x4e, 0x12, 0x1a, 0x2e, - 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, - 0x53, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x64, 0x69, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x53, 0x4e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x32, 0xbc, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, - 0x10, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x21, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1d, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, - 0x2f, 0x64, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} +const file_adiom_v1_adiom_proto_rawDesc = "" + + "\n" + + "\x14adiom/v1/adiom.proto\x12\badiom.v1\x1a\x17adiom/v1/messages.proto2\xfc\x04\n" + + "\x10ConnectorService\x12>\n" + + "\aGetInfo\x12\x18.adiom.v1.GetInfoRequest\x1a\x19.adiom.v1.GetInfoResponse\x12e\n" + + "\x14GetNamespaceMetadata\x12%.adiom.v1.GetNamespaceMetadataRequest\x1a&.adiom.v1.GetNamespaceMetadataResponse\x12D\n" + + "\tWriteData\x12\x1a.adiom.v1.WriteDataRequest\x1a\x1b.adiom.v1.WriteDataResponse\x12M\n" + + "\fWriteUpdates\x12\x1d.adiom.v1.WriteUpdatesRequest\x1a\x1e.adiom.v1.WriteUpdatesResponse\x12M\n" + + "\fGeneratePlan\x12\x1d.adiom.v1.GeneratePlanRequest\x1a\x1e.adiom.v1.GeneratePlanResponse\x12A\n" + + "\bListData\x12\x19.adiom.v1.ListDataRequest\x1a\x1a.adiom.v1.ListDataResponse\x12R\n" + + "\rStreamUpdates\x12\x1e.adiom.v1.StreamUpdatesRequest\x1a\x1f.adiom.v1.StreamUpdatesResponse0\x01\x12F\n" + + "\tStreamLSN\x12\x1a.adiom.v1.StreamLSNRequest\x1a\x1b.adiom.v1.StreamLSNResponse0\x012\xbc\x01\n" + + "\x10TransformService\x12Y\n" + + "\x10GetTransformInfo\x12!.adiom.v1.GetTransformInfoRequest\x1a\".adiom.v1.GetTransformInfoResponse\x12M\n" + + "\fGetTransform\x12\x1d.adiom.v1.GetTransformRequest\x1a\x1e.adiom.v1.GetTransformResponseB2Z0github.com/adiom-data/dsync/gen/adiom/v1;adiomv1b\x06proto3" var file_adiom_v1_adiom_proto_goTypes = []any{ (*GetInfoRequest)(nil), // 0: adiom.v1.GetInfoRequest @@ -144,7 +98,7 @@ func file_adiom_v1_adiom_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_adiom_v1_adiom_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_adiom_v1_adiom_proto_rawDesc), len(file_adiom_v1_adiom_proto_rawDesc)), NumEnums: 0, NumMessages: 0, NumExtensions: 0, @@ -154,7 +108,6 @@ func file_adiom_v1_adiom_proto_init() { DependencyIndexes: file_adiom_v1_adiom_proto_depIdxs, }.Build() File_adiom_v1_adiom_proto = out.File - file_adiom_v1_adiom_proto_rawDesc = nil file_adiom_v1_adiom_proto_goTypes = nil file_adiom_v1_adiom_proto_depIdxs = nil } diff --git a/gen/adiom/v1/adiomv1connect/adiom.connect.go b/gen/adiom/v1/adiomv1connect/adiom.connect.go index e1d570a9..3d9df20d 100644 --- a/gen/adiom/v1/adiomv1connect/adiom.connect.go +++ b/gen/adiom/v1/adiomv1connect/adiom.connect.go @@ -67,22 +67,6 @@ const ( TransformServiceGetTransformProcedure = "/adiom.v1.TransformService/GetTransform" ) -// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. -var ( - connectorServiceServiceDescriptor = v1.File_adiom_v1_adiom_proto.Services().ByName("ConnectorService") - connectorServiceGetInfoMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("GetInfo") - connectorServiceGetNamespaceMetadataMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("GetNamespaceMetadata") - connectorServiceWriteDataMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("WriteData") - connectorServiceWriteUpdatesMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("WriteUpdates") - connectorServiceGeneratePlanMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("GeneratePlan") - connectorServiceListDataMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("ListData") - connectorServiceStreamUpdatesMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("StreamUpdates") - connectorServiceStreamLSNMethodDescriptor = connectorServiceServiceDescriptor.Methods().ByName("StreamLSN") - transformServiceServiceDescriptor = v1.File_adiom_v1_adiom_proto.Services().ByName("TransformService") - transformServiceGetTransformInfoMethodDescriptor = transformServiceServiceDescriptor.Methods().ByName("GetTransformInfo") - transformServiceGetTransformMethodDescriptor = transformServiceServiceDescriptor.Methods().ByName("GetTransform") -) - // ConnectorServiceClient is a client for the adiom.v1.ConnectorService service. type ConnectorServiceClient interface { GetInfo(context.Context, *connect.Request[v1.GetInfoRequest]) (*connect.Response[v1.GetInfoResponse], error) @@ -106,53 +90,54 @@ type ConnectorServiceClient interface { // http://api.acme.com or https://acme.com/grpc). func NewConnectorServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConnectorServiceClient { baseURL = strings.TrimRight(baseURL, "/") + connectorServiceMethods := v1.File_adiom_v1_adiom_proto.Services().ByName("ConnectorService").Methods() return &connectorServiceClient{ getInfo: connect.NewClient[v1.GetInfoRequest, v1.GetInfoResponse]( httpClient, baseURL+ConnectorServiceGetInfoProcedure, - connect.WithSchema(connectorServiceGetInfoMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("GetInfo")), connect.WithClientOptions(opts...), ), getNamespaceMetadata: connect.NewClient[v1.GetNamespaceMetadataRequest, v1.GetNamespaceMetadataResponse]( httpClient, baseURL+ConnectorServiceGetNamespaceMetadataProcedure, - connect.WithSchema(connectorServiceGetNamespaceMetadataMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("GetNamespaceMetadata")), connect.WithClientOptions(opts...), ), writeData: connect.NewClient[v1.WriteDataRequest, v1.WriteDataResponse]( httpClient, baseURL+ConnectorServiceWriteDataProcedure, - connect.WithSchema(connectorServiceWriteDataMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("WriteData")), connect.WithClientOptions(opts...), ), writeUpdates: connect.NewClient[v1.WriteUpdatesRequest, v1.WriteUpdatesResponse]( httpClient, baseURL+ConnectorServiceWriteUpdatesProcedure, - connect.WithSchema(connectorServiceWriteUpdatesMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("WriteUpdates")), connect.WithClientOptions(opts...), ), generatePlan: connect.NewClient[v1.GeneratePlanRequest, v1.GeneratePlanResponse]( httpClient, baseURL+ConnectorServiceGeneratePlanProcedure, - connect.WithSchema(connectorServiceGeneratePlanMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("GeneratePlan")), connect.WithClientOptions(opts...), ), listData: connect.NewClient[v1.ListDataRequest, v1.ListDataResponse]( httpClient, baseURL+ConnectorServiceListDataProcedure, - connect.WithSchema(connectorServiceListDataMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("ListData")), connect.WithClientOptions(opts...), ), streamUpdates: connect.NewClient[v1.StreamUpdatesRequest, v1.StreamUpdatesResponse]( httpClient, baseURL+ConnectorServiceStreamUpdatesProcedure, - connect.WithSchema(connectorServiceStreamUpdatesMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("StreamUpdates")), connect.WithClientOptions(opts...), ), streamLSN: connect.NewClient[v1.StreamLSNRequest, v1.StreamLSNResponse]( httpClient, baseURL+ConnectorServiceStreamLSNProcedure, - connect.WithSchema(connectorServiceStreamLSNMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("StreamLSN")), connect.WithClientOptions(opts...), ), } @@ -230,52 +215,53 @@ type ConnectorServiceHandler interface { // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. func NewConnectorServiceHandler(svc ConnectorServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + connectorServiceMethods := v1.File_adiom_v1_adiom_proto.Services().ByName("ConnectorService").Methods() connectorServiceGetInfoHandler := connect.NewUnaryHandler( ConnectorServiceGetInfoProcedure, svc.GetInfo, - connect.WithSchema(connectorServiceGetInfoMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("GetInfo")), connect.WithHandlerOptions(opts...), ) connectorServiceGetNamespaceMetadataHandler := connect.NewUnaryHandler( ConnectorServiceGetNamespaceMetadataProcedure, svc.GetNamespaceMetadata, - connect.WithSchema(connectorServiceGetNamespaceMetadataMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("GetNamespaceMetadata")), connect.WithHandlerOptions(opts...), ) connectorServiceWriteDataHandler := connect.NewUnaryHandler( ConnectorServiceWriteDataProcedure, svc.WriteData, - connect.WithSchema(connectorServiceWriteDataMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("WriteData")), connect.WithHandlerOptions(opts...), ) connectorServiceWriteUpdatesHandler := connect.NewUnaryHandler( ConnectorServiceWriteUpdatesProcedure, svc.WriteUpdates, - connect.WithSchema(connectorServiceWriteUpdatesMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("WriteUpdates")), connect.WithHandlerOptions(opts...), ) connectorServiceGeneratePlanHandler := connect.NewUnaryHandler( ConnectorServiceGeneratePlanProcedure, svc.GeneratePlan, - connect.WithSchema(connectorServiceGeneratePlanMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("GeneratePlan")), connect.WithHandlerOptions(opts...), ) connectorServiceListDataHandler := connect.NewUnaryHandler( ConnectorServiceListDataProcedure, svc.ListData, - connect.WithSchema(connectorServiceListDataMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("ListData")), connect.WithHandlerOptions(opts...), ) connectorServiceStreamUpdatesHandler := connect.NewServerStreamHandler( ConnectorServiceStreamUpdatesProcedure, svc.StreamUpdates, - connect.WithSchema(connectorServiceStreamUpdatesMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("StreamUpdates")), connect.WithHandlerOptions(opts...), ) connectorServiceStreamLSNHandler := connect.NewServerStreamHandler( ConnectorServiceStreamLSNProcedure, svc.StreamLSN, - connect.WithSchema(connectorServiceStreamLSNMethodDescriptor), + connect.WithSchema(connectorServiceMethods.ByName("StreamLSN")), connect.WithHandlerOptions(opts...), ) return "/adiom.v1.ConnectorService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -352,17 +338,18 @@ type TransformServiceClient interface { // http://api.acme.com or https://acme.com/grpc). func NewTransformServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) TransformServiceClient { baseURL = strings.TrimRight(baseURL, "/") + transformServiceMethods := v1.File_adiom_v1_adiom_proto.Services().ByName("TransformService").Methods() return &transformServiceClient{ getTransformInfo: connect.NewClient[v1.GetTransformInfoRequest, v1.GetTransformInfoResponse]( httpClient, baseURL+TransformServiceGetTransformInfoProcedure, - connect.WithSchema(transformServiceGetTransformInfoMethodDescriptor), + connect.WithSchema(transformServiceMethods.ByName("GetTransformInfo")), connect.WithClientOptions(opts...), ), getTransform: connect.NewClient[v1.GetTransformRequest, v1.GetTransformResponse]( httpClient, baseURL+TransformServiceGetTransformProcedure, - connect.WithSchema(transformServiceGetTransformMethodDescriptor), + connect.WithSchema(transformServiceMethods.ByName("GetTransform")), connect.WithClientOptions(opts...), ), } @@ -396,16 +383,17 @@ type TransformServiceHandler interface { // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. func NewTransformServiceHandler(svc TransformServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + transformServiceMethods := v1.File_adiom_v1_adiom_proto.Services().ByName("TransformService").Methods() transformServiceGetTransformInfoHandler := connect.NewUnaryHandler( TransformServiceGetTransformInfoProcedure, svc.GetTransformInfo, - connect.WithSchema(transformServiceGetTransformInfoMethodDescriptor), + connect.WithSchema(transformServiceMethods.ByName("GetTransformInfo")), connect.WithHandlerOptions(opts...), ) transformServiceGetTransformHandler := connect.NewUnaryHandler( TransformServiceGetTransformProcedure, svc.GetTransform, - connect.WithSchema(transformServiceGetTransformMethodDescriptor), + connect.WithSchema(transformServiceMethods.ByName("GetTransform")), connect.WithHandlerOptions(opts...), ) return "/adiom.v1.TransformService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/gen/adiom/v1/adiomv1connect/vector.connect.go b/gen/adiom/v1/adiomv1connect/vector.connect.go index d297739d..07057692 100644 --- a/gen/adiom/v1/adiomv1connect/vector.connect.go +++ b/gen/adiom/v1/adiomv1connect/vector.connect.go @@ -49,16 +49,6 @@ const ( EmbeddingServiceGetEmbeddingProcedure = "/adiom.v1.EmbeddingService/GetEmbedding" ) -// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. -var ( - chunkingServiceServiceDescriptor = v1.File_adiom_v1_vector_proto.Services().ByName("ChunkingService") - chunkingServiceGetSupportedDataTypesMethodDescriptor = chunkingServiceServiceDescriptor.Methods().ByName("GetSupportedDataTypes") - chunkingServiceGetChunkedMethodDescriptor = chunkingServiceServiceDescriptor.Methods().ByName("GetChunked") - embeddingServiceServiceDescriptor = v1.File_adiom_v1_vector_proto.Services().ByName("EmbeddingService") - embeddingServiceGetSupportedDataTypesMethodDescriptor = embeddingServiceServiceDescriptor.Methods().ByName("GetSupportedDataTypes") - embeddingServiceGetEmbeddingMethodDescriptor = embeddingServiceServiceDescriptor.Methods().ByName("GetEmbedding") -) - // ChunkingServiceClient is a client for the adiom.v1.ChunkingService service. type ChunkingServiceClient interface { GetSupportedDataTypes(context.Context, *connect.Request[v1.GetSupportedDataTypesRequest]) (*connect.Response[v1.GetSupportedDataTypesResponse], error) @@ -74,17 +64,18 @@ type ChunkingServiceClient interface { // http://api.acme.com or https://acme.com/grpc). func NewChunkingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChunkingServiceClient { baseURL = strings.TrimRight(baseURL, "/") + chunkingServiceMethods := v1.File_adiom_v1_vector_proto.Services().ByName("ChunkingService").Methods() return &chunkingServiceClient{ getSupportedDataTypes: connect.NewClient[v1.GetSupportedDataTypesRequest, v1.GetSupportedDataTypesResponse]( httpClient, baseURL+ChunkingServiceGetSupportedDataTypesProcedure, - connect.WithSchema(chunkingServiceGetSupportedDataTypesMethodDescriptor), + connect.WithSchema(chunkingServiceMethods.ByName("GetSupportedDataTypes")), connect.WithClientOptions(opts...), ), getChunked: connect.NewClient[v1.GetChunkedRequest, v1.GetChunkedResponse]( httpClient, baseURL+ChunkingServiceGetChunkedProcedure, - connect.WithSchema(chunkingServiceGetChunkedMethodDescriptor), + connect.WithSchema(chunkingServiceMethods.ByName("GetChunked")), connect.WithClientOptions(opts...), ), } @@ -118,16 +109,17 @@ type ChunkingServiceHandler interface { // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. func NewChunkingServiceHandler(svc ChunkingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + chunkingServiceMethods := v1.File_adiom_v1_vector_proto.Services().ByName("ChunkingService").Methods() chunkingServiceGetSupportedDataTypesHandler := connect.NewUnaryHandler( ChunkingServiceGetSupportedDataTypesProcedure, svc.GetSupportedDataTypes, - connect.WithSchema(chunkingServiceGetSupportedDataTypesMethodDescriptor), + connect.WithSchema(chunkingServiceMethods.ByName("GetSupportedDataTypes")), connect.WithHandlerOptions(opts...), ) chunkingServiceGetChunkedHandler := connect.NewUnaryHandler( ChunkingServiceGetChunkedProcedure, svc.GetChunked, - connect.WithSchema(chunkingServiceGetChunkedMethodDescriptor), + connect.WithSchema(chunkingServiceMethods.ByName("GetChunked")), connect.WithHandlerOptions(opts...), ) return "/adiom.v1.ChunkingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -168,17 +160,18 @@ type EmbeddingServiceClient interface { // http://api.acme.com or https://acme.com/grpc). func NewEmbeddingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) EmbeddingServiceClient { baseURL = strings.TrimRight(baseURL, "/") + embeddingServiceMethods := v1.File_adiom_v1_vector_proto.Services().ByName("EmbeddingService").Methods() return &embeddingServiceClient{ getSupportedDataTypes: connect.NewClient[v1.GetSupportedDataTypesRequest, v1.GetSupportedDataTypesResponse]( httpClient, baseURL+EmbeddingServiceGetSupportedDataTypesProcedure, - connect.WithSchema(embeddingServiceGetSupportedDataTypesMethodDescriptor), + connect.WithSchema(embeddingServiceMethods.ByName("GetSupportedDataTypes")), connect.WithClientOptions(opts...), ), getEmbedding: connect.NewClient[v1.GetEmbeddingRequest, v1.GetEmbeddingResponse]( httpClient, baseURL+EmbeddingServiceGetEmbeddingProcedure, - connect.WithSchema(embeddingServiceGetEmbeddingMethodDescriptor), + connect.WithSchema(embeddingServiceMethods.ByName("GetEmbedding")), connect.WithClientOptions(opts...), ), } @@ -212,16 +205,17 @@ type EmbeddingServiceHandler interface { // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. func NewEmbeddingServiceHandler(svc EmbeddingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + embeddingServiceMethods := v1.File_adiom_v1_vector_proto.Services().ByName("EmbeddingService").Methods() embeddingServiceGetSupportedDataTypesHandler := connect.NewUnaryHandler( EmbeddingServiceGetSupportedDataTypesProcedure, svc.GetSupportedDataTypes, - connect.WithSchema(embeddingServiceGetSupportedDataTypesMethodDescriptor), + connect.WithSchema(embeddingServiceMethods.ByName("GetSupportedDataTypes")), connect.WithHandlerOptions(opts...), ) embeddingServiceGetEmbeddingHandler := connect.NewUnaryHandler( EmbeddingServiceGetEmbeddingProcedure, svc.GetEmbedding, - connect.WithSchema(embeddingServiceGetEmbeddingMethodDescriptor), + connect.WithSchema(embeddingServiceMethods.ByName("GetEmbedding")), connect.WithHandlerOptions(opts...), ) return "/adiom.v1.EmbeddingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/gen/adiom/v1/messages.pb.go b/gen/adiom/v1/messages.pb.go index c9b0373d..4a322f23 100644 --- a/gen/adiom/v1/messages.pb.go +++ b/gen/adiom/v1/messages.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: adiom/v1/messages.proto @@ -12,6 +12,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -883,6 +884,7 @@ type WriteDataRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Data [][]byte `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` Type DataType `protobuf:"varint,3,opt,name=type,proto3,enum=adiom.v1.DataType" json:"type,omitempty"` + TaskId uint32 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -938,6 +940,13 @@ func (x *WriteDataRequest) GetType() DataType { return DataType_DATA_TYPE_UNKNOWN } +func (x *WriteDataRequest) GetTaskId() uint32 { + if x != nil { + return x.TaskId + } + return 0 +} + type WriteDataResponse struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -1766,249 +1775,148 @@ func (x *GetTransformInfoResponse_TransformInfo) GetResponseTypes() []DataType { var File_adiom_v1_messages_proto protoreflect.FileDescriptor -var file_adiom_v1_messages_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 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, 0x47, 0x0a, 0x09, 0x42, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9e, 0x01, - 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, - 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xbe, - 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0e, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x89, 0x03, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x12, 0x35, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x69, 0x6e, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x69, - 0x6e, 0x6b, 0x52, 0x04, 0x73, 0x69, 0x6e, 0x6b, 0x1a, 0xc2, 0x01, 0x0a, 0x06, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x44, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x73, 0x6e, - 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, - 0x73, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x70, 0x6c, 0x61, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x1a, 0x4c, 0x0a, - 0x04, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x44, 0x0a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa4, 0x01, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x22, 0x34, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x72, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, - 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x96, 0x01, 0x0a, 0x14, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x12, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, - 0x23, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x64, - 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x12, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, - 0x6e, 0x73, 0x65, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x64, - 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x10, 0x4c, - 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x22, 0x6c, 0x0a, 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, - 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x16, 0x0a, 0x14, 0x57, 0x72, 0x69, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x76, 0x0a, 0x14, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, - 0x72, 0x22, 0xb2, 0x01, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, - 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, - 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 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, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4a, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x4c, 0x53, 0x4e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x22, 0x46, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x53, 0x4e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x73, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x73, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, - 0x74, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, - 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa6, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x6f, 0x72, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x75, 0x73, 0x65, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x75, 0x73, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x81, 0x01, 0x0a, 0x0d, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x0c, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, - 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xe3, - 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x22, 0x71, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xaf, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2a, - 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, - 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2a, 0x52, 0x0a, 0x08, 0x44, 0x61, 0x74, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, - 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x5f, - 0x42, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x10, 0x02, 0x2a, 0x8d, 0x01, - 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, - 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, - 0x12, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x50, 0x44, - 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x1e, 0x0a, - 0x1a, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, - 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x04, 0x42, 0x32, 0x5a, - 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x69, 0x6f, - 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_adiom_v1_messages_proto_rawDesc = "" + + "\n" + + "\x17adiom/v1/messages.proto\x12\badiom.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"G\n" + + "\tBsonValue\x12\x12\n" + + "\x04data\x18\x01 \x01(\fR\x04data\x12\x12\n" + + "\x04type\x18\x02 \x01(\rR\x04type\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\"\x9e\x01\n" + + "\x10UpdatesPartition\x12\x1e\n" + + "\n" + + "namespaces\x18\x01 \x03(\tR\n" + + "namespaces\x12)\n" + + "\x10partition_header\x18\x02 \x01(\tR\x0fpartitionHeader\x12'\n" + + "\x0fpartition_value\x18\x03 \x01(\tR\x0epartitionValue\x12\x16\n" + + "\x06cursor\x18\x04 \x01(\fR\x06cursor\"\xbe\x01\n" + + "\tPartition\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12)\n" + + "\x10partition_header\x18\x02 \x01(\tR\x0fpartitionHeader\x12'\n" + + "\x0fpartition_value\x18\x03 \x01(\tR\x0epartitionValue\x12\x16\n" + + "\x06cursor\x18\x04 \x01(\fR\x06cursor\x12'\n" + + "\x0festimated_count\x18\x05 \x01(\x04R\x0eestimatedCount\"\x89\x03\n" + + "\fCapabilities\x125\n" + + "\x06source\x18\x01 \x01(\v2\x1d.adiom.v1.Capabilities.SourceR\x06source\x12/\n" + + "\x04sink\x18\x02 \x01(\v2\x1b.adiom.v1.Capabilities.SinkR\x04sink\x1a\xc2\x01\n" + + "\x06Source\x12D\n" + + "\x14supported_data_types\x18\x01 \x03(\x0e2\x12.adiom.v1.DataTypeR\x12supportedDataTypes\x12\x1d\n" + + "\n" + + "lsn_stream\x18\x02 \x01(\bR\tlsnStream\x120\n" + + "\x14multi_namespace_plan\x18\x03 \x01(\bR\x12multiNamespacePlan\x12!\n" + + "\fdefault_plan\x18\x04 \x01(\bR\vdefaultPlan\x1aL\n" + + "\x04Sink\x12D\n" + + "\x14supported_data_types\x18\x01 \x03(\x0e2\x12.adiom.v1.DataTypeR\x12supportedDataTypes\"\x10\n" + + "\x0eGetInfoRequest\"\xa4\x01\n" + + "\x0fGetInfoResponse\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n" + + "\adb_type\x18\x02 \x01(\tR\x06dbType\x12\x18\n" + + "\aversion\x18\x03 \x01(\tR\aversion\x12\x12\n" + + "\x04spec\x18\x04 \x01(\tR\x04spec\x12:\n" + + "\fcapabilities\x18\x05 \x01(\v2\x16.adiom.v1.CapabilitiesR\fcapabilities\";\n" + + "\x1bGetNamespaceMetadataRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\"4\n" + + "\x1cGetNamespaceMetadataResponse\x12\x14\n" + + "\x05count\x18\x01 \x01(\x04R\x05count\"r\n" + + "\x13GeneratePlanRequest\x12\x1e\n" + + "\n" + + "namespaces\x18\x01 \x03(\tR\n" + + "namespaces\x12!\n" + + "\finitial_sync\x18\x02 \x01(\bR\vinitialSync\x12\x18\n" + + "\aupdates\x18\x03 \x01(\bR\aupdates\"\x96\x01\n" + + "\x14GeneratePlanResponse\x123\n" + + "\n" + + "partitions\x18\x01 \x03(\v2\x13.adiom.v1.PartitionR\n" + + "partitions\x12I\n" + + "\x12updates_partitions\x18\x02 \x03(\v2\x1a.adiom.v1.UpdatesPartitionR\x11updatesPartitions\"\x9d\x01\n" + + "\x06Update\x12#\n" + + "\x02id\x18\x01 \x03(\v2\x13.adiom.v1.BsonValueR\x02id\x12(\n" + + "\x04type\x18\x02 \x01(\x0e2\x14.adiom.v1.UpdateTypeR\x04type\x12\x12\n" + + "\x04data\x18\x03 \x01(\fR\x04data\x120\n" + + "\x14partial_update_unset\x18\x04 \x03(\tR\x12partialUpdateUnset\"\x84\x01\n" + + "\x0fListDataRequest\x121\n" + + "\tpartition\x18\x01 \x01(\v2\x13.adiom.v1.PartitionR\tpartition\x12&\n" + + "\x04type\x18\x02 \x01(\x0e2\x12.adiom.v1.DataTypeR\x04type\x12\x16\n" + + "\x06cursor\x18\x03 \x01(\fR\x06cursor\"G\n" + + "\x10ListDataResponse\x12\x12\n" + + "\x04data\x18\x01 \x03(\fR\x04data\x12\x1f\n" + + "\vnext_cursor\x18\x02 \x01(\fR\n" + + "nextCursor\"\x85\x01\n" + + "\x10WriteDataRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12\x12\n" + + "\x04data\x18\x02 \x03(\fR\x04data\x12&\n" + + "\x04type\x18\x03 \x01(\x0e2\x12.adiom.v1.DataTypeR\x04type\x12\x17\n" + + "\atask_id\x18\x04 \x01(\rR\x06taskId\"\x13\n" + + "\x11WriteDataResponse\"\x87\x01\n" + + "\x13WriteUpdatesRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12*\n" + + "\aupdates\x18\x02 \x03(\v2\x10.adiom.v1.UpdateR\aupdates\x12&\n" + + "\x04type\x18\x03 \x01(\x0e2\x12.adiom.v1.DataTypeR\x04type\"\x16\n" + + "\x14WriteUpdatesResponse\"v\n" + + "\x14StreamUpdatesRequest\x12\x1e\n" + + "\n" + + "namespaces\x18\x01 \x03(\tR\n" + + "namespaces\x12&\n" + + "\x04type\x18\x02 \x01(\x0e2\x12.adiom.v1.DataTypeR\x04type\x12\x16\n" + + "\x06cursor\x18\x03 \x01(\fR\x06cursor\"\xb2\x01\n" + + "\x15StreamUpdatesResponse\x12*\n" + + "\aupdates\x18\x01 \x03(\v2\x10.adiom.v1.UpdateR\aupdates\x12\x1c\n" + + "\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x1f\n" + + "\vnext_cursor\x18\x03 \x01(\fR\n" + + "nextCursor\x12.\n" + + "\x04time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\"J\n" + + "\x10StreamLSNRequest\x12\x1e\n" + + "\n" + + "namespaces\x18\x01 \x03(\tR\n" + + "namespaces\x12\x16\n" + + "\x06cursor\x18\x02 \x01(\fR\x06cursor\"F\n" + + "\x11StreamLSNResponse\x12\x10\n" + + "\x03lsn\x18\x01 \x01(\x04R\x03lsn\x12\x1f\n" + + "\vnext_cursor\x18\x02 \x01(\fR\n" + + "nextCursor\"\x19\n" + + "\x17GetTransformInfoRequest\"\xa6\x02\n" + + "\x18GetTransformInfoResponse\x12P\n" + + "\n" + + "transforms\x18\x01 \x03(\v20.adiom.v1.GetTransformInfoResponse.TransformInfoR\n" + + "transforms\x124\n" + + "\x16use_multiple_responses\x18\x02 \x01(\bR\x14useMultipleResponses\x1a\x81\x01\n" + + "\rTransformInfo\x125\n" + + "\frequest_type\x18\x01 \x01(\x0e2\x12.adiom.v1.DataTypeR\vrequestType\x129\n" + + "\x0eresponse_types\x18\x02 \x03(\x0e2\x12.adiom.v1.DataTypeR\rresponseTypes\"\xe3\x01\n" + + "\x13GetTransformRequest\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12*\n" + + "\aupdates\x18\x02 \x03(\v2\x10.adiom.v1.UpdateR\aupdates\x12\x12\n" + + "\x04data\x18\x03 \x03(\fR\x04data\x125\n" + + "\frequest_type\x18\x04 \x01(\x0e2\x12.adiom.v1.DataTypeR\vrequestType\x127\n" + + "\rresponse_type\x18\x05 \x01(\x0e2\x12.adiom.v1.DataTypeR\fresponseType\"q\n" + + "\x11TransformResponse\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12*\n" + + "\aupdates\x18\x02 \x03(\v2\x10.adiom.v1.UpdateR\aupdates\x12\x12\n" + + "\x04data\x18\x03 \x03(\fR\x04data\"\xaf\x01\n" + + "\x14GetTransformResponse\x12\x1c\n" + + "\tnamespace\x18\x01 \x01(\tR\tnamespace\x12*\n" + + "\aupdates\x18\x02 \x03(\v2\x10.adiom.v1.UpdateR\aupdates\x12\x12\n" + + "\x04data\x18\x03 \x03(\fR\x04data\x129\n" + + "\tresponses\x18\x04 \x03(\v2\x1b.adiom.v1.TransformResponseR\tresponses*R\n" + + "\bDataType\x12\x15\n" + + "\x11DATA_TYPE_UNKNOWN\x10\x00\x12\x18\n" + + "\x14DATA_TYPE_MONGO_BSON\x10\x01\x12\x15\n" + + "\x11DATA_TYPE_JSON_ID\x10\x02*\x8d\x01\n" + + "\n" + + "UpdateType\x12\x17\n" + + "\x13UPDATE_TYPE_UNKNOWN\x10\x00\x12\x16\n" + + "\x12UPDATE_TYPE_INSERT\x10\x01\x12\x16\n" + + "\x12UPDATE_TYPE_UPDATE\x10\x02\x12\x16\n" + + "\x12UPDATE_TYPE_DELETE\x10\x03\x12\x1e\n" + + "\x1aUPDATE_TYPE_PARTIAL_UPDATE\x10\x04B2Z0github.com/adiom-data/dsync/gen/adiom/v1;adiomv1b\x06proto3" var ( file_adiom_v1_messages_proto_rawDescOnce sync.Once - file_adiom_v1_messages_proto_rawDescData = file_adiom_v1_messages_proto_rawDesc + file_adiom_v1_messages_proto_rawDescData []byte ) func file_adiom_v1_messages_proto_rawDescGZIP() []byte { file_adiom_v1_messages_proto_rawDescOnce.Do(func() { - file_adiom_v1_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_adiom_v1_messages_proto_rawDescData) + file_adiom_v1_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_adiom_v1_messages_proto_rawDesc), len(file_adiom_v1_messages_proto_rawDesc))) }) return file_adiom_v1_messages_proto_rawDescData } @@ -2092,7 +2000,7 @@ func file_adiom_v1_messages_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_adiom_v1_messages_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_adiom_v1_messages_proto_rawDesc), len(file_adiom_v1_messages_proto_rawDesc)), NumEnums: 2, NumMessages: 29, NumExtensions: 0, @@ -2104,7 +2012,6 @@ func file_adiom_v1_messages_proto_init() { MessageInfos: file_adiom_v1_messages_proto_msgTypes, }.Build() File_adiom_v1_messages_proto = out.File - file_adiom_v1_messages_proto_rawDesc = nil file_adiom_v1_messages_proto_goTypes = nil file_adiom_v1_messages_proto_depIdxs = nil } diff --git a/gen/adiom/v1/vector.pb.go b/gen/adiom/v1/vector.pb.go index e88cc977..e888ffce 100644 --- a/gen/adiom/v1/vector.pb.go +++ b/gen/adiom/v1/vector.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.1 +// protoc-gen-go v1.36.10 // protoc (unknown) // source: adiom/v1/vector.proto @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -382,79 +383,42 @@ func (x *GetSupportedDataTypesResponse) GetTypes() []DataType { var File_adiom_v1_vector_proto protoreflect.FileDescriptor -var file_adiom_v1_vector_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x1a, 0x17, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x1d, 0x0a, 0x07, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3b, 0x0a, 0x12, 0x47, 0x65, - 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x25, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, - 0x64, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x51, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x6d, - 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x12, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x45, 0x6d, - 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3f, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x62, - 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1e, 0x0a, 0x1c, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x1d, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, - 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x61, - 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x32, 0xc4, 0x01, 0x0a, 0x0f, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, - 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, - 0x6b, 0x65, 0x64, 0x12, 0x1b, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcb, - 0x01, 0x0a, 0x10, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x61, - 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, - 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x62, 0x65, - 0x64, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, - 0x64, 0x69, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x62, 0x65, 0x64, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x32, 0x5a, 0x30, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x64, 0x69, 0x6f, 0x6d, - 0x2d, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x64, 0x69, 0x6f, 0x6d, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} +const file_adiom_v1_vector_proto_rawDesc = "" + + "\n" + + "\x15adiom/v1/vector.proto\x12\badiom.v1\x1a\x17adiom/v1/messages.proto\"O\n" + + "\x11GetChunkedRequest\x12\x12\n" + + "\x04data\x18\x01 \x03(\fR\x04data\x12&\n" + + "\x04type\x18\x02 \x01(\x0e2\x12.adiom.v1.DataTypeR\x04type\"\x1d\n" + + "\aChunked\x12\x12\n" + + "\x04data\x18\x01 \x03(\fR\x04data\";\n" + + "\x12GetChunkedResponse\x12%\n" + + "\x04data\x18\x01 \x03(\v2\x11.adiom.v1.ChunkedR\x04data\"Q\n" + + "\x13GetEmbeddingRequest\x12\x12\n" + + "\x04data\x18\x01 \x03(\fR\x04data\x12&\n" + + "\x04type\x18\x02 \x01(\x0e2\x12.adiom.v1.DataTypeR\x04type\"\x1f\n" + + "\tEmbedding\x12\x12\n" + + "\x04data\x18\x01 \x03(\x01R\x04data\"?\n" + + "\x14GetEmbeddingResponse\x12'\n" + + "\x04data\x18\x01 \x03(\v2\x13.adiom.v1.EmbeddingR\x04data\"\x1e\n" + + "\x1cGetSupportedDataTypesRequest\"I\n" + + "\x1dGetSupportedDataTypesResponse\x12(\n" + + "\x05types\x18\x01 \x03(\x0e2\x12.adiom.v1.DataTypeR\x05types2\xc4\x01\n" + + "\x0fChunkingService\x12h\n" + + "\x15GetSupportedDataTypes\x12&.adiom.v1.GetSupportedDataTypesRequest\x1a'.adiom.v1.GetSupportedDataTypesResponse\x12G\n" + + "\n" + + "GetChunked\x12\x1b.adiom.v1.GetChunkedRequest\x1a\x1c.adiom.v1.GetChunkedResponse2\xcb\x01\n" + + "\x10EmbeddingService\x12h\n" + + "\x15GetSupportedDataTypes\x12&.adiom.v1.GetSupportedDataTypesRequest\x1a'.adiom.v1.GetSupportedDataTypesResponse\x12M\n" + + "\fGetEmbedding\x12\x1d.adiom.v1.GetEmbeddingRequest\x1a\x1e.adiom.v1.GetEmbeddingResponseB2Z0github.com/adiom-data/dsync/gen/adiom/v1;adiomv1b\x06proto3" var ( file_adiom_v1_vector_proto_rawDescOnce sync.Once - file_adiom_v1_vector_proto_rawDescData = file_adiom_v1_vector_proto_rawDesc + file_adiom_v1_vector_proto_rawDescData []byte ) func file_adiom_v1_vector_proto_rawDescGZIP() []byte { file_adiom_v1_vector_proto_rawDescOnce.Do(func() { - file_adiom_v1_vector_proto_rawDescData = protoimpl.X.CompressGZIP(file_adiom_v1_vector_proto_rawDescData) + file_adiom_v1_vector_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_adiom_v1_vector_proto_rawDesc), len(file_adiom_v1_vector_proto_rawDesc))) }) return file_adiom_v1_vector_proto_rawDescData } @@ -502,7 +466,7 @@ func file_adiom_v1_vector_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_adiom_v1_vector_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_adiom_v1_vector_proto_rawDesc), len(file_adiom_v1_vector_proto_rawDesc)), NumEnums: 0, NumMessages: 8, NumExtensions: 0, @@ -513,7 +477,6 @@ func file_adiom_v1_vector_proto_init() { MessageInfos: file_adiom_v1_vector_proto_msgTypes, }.Build() File_adiom_v1_vector_proto = out.File - file_adiom_v1_vector_proto_rawDesc = nil file_adiom_v1_vector_proto_goTypes = nil file_adiom_v1_vector_proto_depIdxs = nil } diff --git a/go.mod b/go.mod index 1ffb3ef5..e6a595a9 100644 --- a/go.mod +++ b/go.mod @@ -7,11 +7,12 @@ toolchain go1.24.3 require ( connectrpc.com/connect v1.18.1 connectrpc.com/grpcreflect v1.3.0 - github.com/aws/aws-sdk-go-v2 v1.36.5 + github.com/aws/aws-sdk-go-v2 v1.40.0 github.com/aws/aws-sdk-go-v2/config v1.29.17 github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.3 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.4 github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.6 + github.com/aws/aws-sdk-go-v2/service/s3 v1.92.1 github.com/benbjohnson/clock v1.3.5 github.com/cenkalti/backoff/v4 v4.3.0 github.com/cespare/xxhash v1.1.0 @@ -39,18 +40,22 @@ require ( require ( github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.70 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.17 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 // indirect - github.com/aws/smithy-go v1.22.4 // indirect + github.com/aws/smithy-go v1.23.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/gdamore/encoding v1.0.1 // indirect github.com/go-openapi/analysis v0.23.0 // indirect diff --git a/go.sum b/go.sum index 600683c0..b053e468 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,10 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go-v2 v1.36.5 h1:0OF9RiEMEdDdZEMqF9MRjevyxAQcf6gY+E7vwBILFj0= -github.com/aws/aws-sdk-go-v2 v1.36.5/go.mod h1:EYrzvCCN9CMUTa5+6lf6MM4tq3Zjp8UhSGR/cBsjai0= +github.com/aws/aws-sdk-go-v2 v1.40.0 h1:/WMUA0kjhZExjOQN2z3oLALDREea1A7TobfuiBrKlwc= +github.com/aws/aws-sdk-go-v2 v1.40.0/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 h1:DHctwEM8P8iTXFxC/QK0MRjwEpWQeM9yzidCRjldUz0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3/go.mod h1:xdCzcZEtnSTKVDOmUZs4l/j3pSV6rpo1WXl5ugNsL8Y= github.com/aws/aws-sdk-go-v2/config v1.29.17 h1:jSuiQ5jEe4SAMH6lLRMY9OVC+TqJLP5655pBGjmnjr0= github.com/aws/aws-sdk-go-v2/config v1.29.17/go.mod h1:9P4wwACpbeXs9Pm9w1QTh6BwWwJjwYvJ1iCt5QbCXh8= github.com/aws/aws-sdk-go-v2/credentials v1.17.70 h1:ONnH5CM16RTXRkS8Z1qg7/s2eDOhHhaXVd72mmyv4/0= @@ -25,30 +27,38 @@ github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.3 h1:xQYRnbQ+ github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.3/go.mod h1:X7RC8FFkx0bjNJRBddd3xdoDaDmNLSxICFdIdJ7asqw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 h1:KAXP9JSHO1vKGCr5f4O6WmlVKLFFXgWYAGoJosorxzU= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32/go.mod h1:h4Sg6FQdexC1yYG9RDnOvLbW1a/P986++/Y/a+GyEM8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 h1:SsytQyTMHMDPspp+spo7XwXTP44aJZZAC7fBV2C5+5s= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36/go.mod h1:Q1lnJArKRXkenyog6+Y+zr7WDpk4e6XlR6gs20bbeNo= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 h1:i2vNHQiXUvKhs3quBR6aqlgJaiaexz/aNvdCktW/kAM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36/go.mod h1:UdyGa7Q91id/sdyHPwth+043HhmP6yP9MBHgbZM0xo8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 h1:PZHqQACxYb8mYgms4RZbhZG0a7dPW06xOjmaH0EJC/I= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14/go.mod h1:VymhrMJUWs69D8u0/lZ7jSB6WgaG/NqHi3gX0aYf6U0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 h1:bOS19y6zlJwagBfHxs0ESzr1XCOU2KXJCWcq3E2vfjY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14/go.mod h1:1ipeGBMAxZ0xcTm6y6paC2C/J6f6OO7LBODV9afuAyM= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 h1:ITi7qiDSv/mSGDSWNpZ4k4Ve0DQR6Ug2SJQ8zEHoDXg= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14/go.mod h1:k1xtME53H1b6YpZt74YmwlONMWf4ecM+lut1WQLAF/U= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.4 h1:Rv6o9v2AfdEIKoAa7pQpJ5ch9ji2HevFUvGY6ufawlI= github.com/aws/aws-sdk-go-v2/service/dynamodb v1.43.4/go.mod h1:mWB0GE1bqcVSvpW7OtFA0sKuHk52+IqtnsYU2jUfYAs= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.6 h1:QHaS/SHXfyNycuu4GiWb+AfW5T3bput6X5E3Ai/Q31M= github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.6/go.mod h1:He/RikglWUczbkV+fkdpcV/3GdL/rTRNVy7VaUiezMo= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 h1:x2Ibm/Af8Fi+BH+Hsn9TXGdT+hKbDd5XOTZxTMxDk7o= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3/go.mod h1:IW1jwyrQgMdhisceG8fQLmQIydcT/jWY21rFhzgaKwo= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 h1:Hjkh7kE6D81PgrHlE/m9gx+4TyyeLHuY8xJs7yXN5C4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5/go.mod h1:nPRXgyCfAurhyaTMoBMwRBYBhaHI4lNPAnJmjM0Tslc= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.17 h1:x187MqiHwBGjMGAed8Y8K1VGuCtFvQvXb24r+bwmSdo= github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.17/go.mod h1:mC9qMbA6e1pwEq6X3zDGtZRXMG2YaElJkbJlMVHLs5I= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 h1:t0E6FzREdtCsiLIoLCWsYliNsRBgyGD/MCK571qk4MI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17/go.mod h1:ygpklyoaypuyDvOM5ujWGrYWpAK3h7ugnmKCU/76Ys4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 h1:FIouAnCE46kyYqyhs0XEBDFFSREtdnr8HQuLPQPLCrY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14/go.mod h1:UTwDc5COa5+guonQU8qBikJo1ZJ4ln2r1MkF7Dqag1E= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 h1:FzQE21lNtUor0Fb7QNgnEyiRCBlolLTX/Z1j65S7teM= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14/go.mod h1:s1ydyWG9pm3ZwmmYN21HKyG9WzAZhYVW85wMHs5FV6w= +github.com/aws/aws-sdk-go-v2/service/s3 v1.92.1 h1:OgQy/+0+Kc3khtqiEOk23xQAglXi3Tj0y5doOxbi5tg= +github.com/aws/aws-sdk-go-v2/service/s3 v1.92.1/go.mod h1:wYNqY3L02Z3IgRYxOBPH9I1zD9Cjh9hI5QOy/eOjQvw= github.com/aws/aws-sdk-go-v2/service/sso v1.25.5 h1:AIRJ3lfb2w/1/8wOOSqYb9fUKGwQbtysJ2H1MofRUPg= github.com/aws/aws-sdk-go-v2/service/sso v1.25.5/go.mod h1:b7SiVprpU+iGazDUqvRSLf5XmCdn+JtT1on7uNL6Ipc= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3 h1:BpOxT3yhLwSJ77qIY3DoHAQjZsc4HEGfMCE4NGy3uFg= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.3/go.mod h1:vq/GQR1gOFLquZMSrxUK/cpvKCNVYibNyJ1m7JrU88E= github.com/aws/aws-sdk-go-v2/service/sts v1.34.0 h1:NFOJ/NXEGV4Rq//71Hs1jC/NvPs1ezajK+yQmkwnPV0= github.com/aws/aws-sdk-go-v2/service/sts v1.34.0/go.mod h1:7ph2tGpfQvwzgistp2+zga9f+bCjlQJPkPUmMgDSD7w= -github.com/aws/smithy-go v1.22.4 h1:uqXzVZNuNexwc/xrh6Tb56u89WDlJY6HS+KC0S4QSjw= -github.com/aws/smithy-go v1.22.4/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM= +github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/brianvoe/gofakeit/v7 v7.2.1 h1:AGojgaaCdgq4Adzrd2uWdbGNDyX6MWNhHdQBraNfOHI= diff --git a/internal/app/options/connectorflags.go b/internal/app/options/connectorflags.go index d54df751..58e953a5 100644 --- a/internal/app/options/connectorflags.go +++ b/internal/app/options/connectorflags.go @@ -16,6 +16,7 @@ import ( "github.com/adiom-data/dsync/connectors/null" "github.com/adiom-data/dsync/connectors/postgres" "github.com/adiom-data/dsync/connectors/random" + s3connector "github.com/adiom-data/dsync/connectors/s3" "github.com/adiom-data/dsync/connectors/testconn" "github.com/adiom-data/dsync/connectors/vector" "github.com/adiom-data/dsync/gen/adiom/v1/adiomv1connect" @@ -296,6 +297,23 @@ func GetRegisteredConnectors() []RegisteredConnector { return null.NewConn(c.String("id"), c.Bool("log-json"), c.Duration("sleep"), c.Duration("sleep-jitter")), nil }), }, + { + Name: "S3", + IsConnector: func(s string) bool { + return strings.HasPrefix(strings.ToLower(s), "s3://") + }, + Create: func(args []string, as AdditionalSettings) (adiomv1connect.ConnectorServiceHandler, []string, error) { + if len(args) == 0 { + return nil, nil, fmt.Errorf("missing s3 connection string: %w", ErrMissingConnector) + } + settings := s3connector.ConnectorSettings{ + Uri: args[0], + } + return CreateHelper("s3", "s3://bucket[/prefix] [options]", S3Flags(&settings), func(_ *cli.Context, _ []string, _ AdditionalSettings) (adiomv1connect.ConnectorServiceHandler, error) { + return s3connector.NewConn(settings) + })(args, as) + }, + }, { Name: "testconn", IsConnector: func(s string) bool { @@ -552,6 +570,64 @@ func WeaviateFlags() []cli.Flag { } } +func S3Flags(settings *s3connector.ConnectorSettings) []cli.Flag { + return []cli.Flag{ + altsrc.NewBoolFlag(&cli.BoolFlag{ + Name: "pretty-json", + Usage: "Pretty-print JSON output data", + Value: true, + Destination: &settings.PrettyJSON, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "region", + Usage: "AWS region for the target bucket", + Required: true, + Destination: &settings.Region, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "prefix", + Usage: "Override or append to the key prefix derived from the connection string", + Destination: &settings.Prefix, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "output-format", + Usage: "Output format for stored objects (only 'json' supported)", + Value: "json", + Destination: &settings.OutputFormat, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "profile", + Usage: "Shared config profile", + Destination: &settings.Profile, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "endpoint", + Usage: "Custom S3 endpoint (for Localstack or S3-compatible services)", + Destination: &settings.Endpoint, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "access-key-id", + Usage: "Static AWS access key ID", + Destination: &settings.AccessKeyID, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "secret-access-key", + Usage: "Static AWS secret access key", + Destination: &settings.SecretAccessKey, + }), + altsrc.NewStringFlag(&cli.StringFlag{ + Name: "session-token", + Usage: "Static AWS session token", + Destination: &settings.SessionToken, + }), + altsrc.NewBoolFlag(&cli.BoolFlag{ + Name: "use-path-style", + Usage: "Use path-style addressing (useful for Localstack/minio)", + Destination: &settings.UsePathStyle, + }), + } +} + func CosmosFlags(settings *cosmos.ConnectorSettings) []cli.Flag { return append(MongoFlags(&settings.ConnectorSettings), []cli.Flag{ altsrc.NewIntFlag(&cli.IntFlag{ diff --git a/java/src/main/java/adiom/v1/Messages.java b/java/src/main/java/adiom/v1/Messages.java index 873ca753..7a4a922b 100644 --- a/java/src/main/java/adiom/v1/Messages.java +++ b/java/src/main/java/adiom/v1/Messages.java @@ -12318,6 +12318,12 @@ public interface WriteDataRequestOrBuilder extends * @return The type. */ adiom.v1.Messages.DataType getType(); + + /** + * uint32 task_id = 4 [json_name = "taskId"]; + * @return The taskId. + */ + int getTaskId(); } /** * Protobuf type {@code adiom.v1.WriteDataRequest} @@ -12445,6 +12451,17 @@ public com.google.protobuf.ByteString getData(int index) { return result == null ? adiom.v1.Messages.DataType.UNRECOGNIZED : result; } + public static final int TASK_ID_FIELD_NUMBER = 4; + private int taskId_ = 0; + /** + * uint32 task_id = 4 [json_name = "taskId"]; + * @return The taskId. + */ + @java.lang.Override + public int getTaskId() { + return taskId_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -12468,6 +12485,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (type_ != adiom.v1.Messages.DataType.DATA_TYPE_UNKNOWN.getNumber()) { output.writeEnum(3, type_); } + if (taskId_ != 0) { + output.writeUInt32(4, taskId_); + } getUnknownFields().writeTo(output); } @@ -12493,6 +12513,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, type_); } + if (taskId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, taskId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -12513,6 +12537,8 @@ public boolean equals(final java.lang.Object obj) { if (!getDataList() .equals(other.getDataList())) return false; if (type_ != other.type_) return false; + if (getTaskId() + != other.getTaskId()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12532,6 +12558,8 @@ public int hashCode() { } hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -12666,6 +12694,7 @@ public Builder clear() { namespace_ = ""; data_ = emptyList(com.google.protobuf.ByteString.class); type_ = 0; + taskId_ = 0; return this; } @@ -12709,6 +12738,9 @@ private void buildPartial0(adiom.v1.Messages.WriteDataRequest result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.type_ = type_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.taskId_ = taskId_; + } } @java.lang.Override @@ -12742,6 +12774,9 @@ public Builder mergeFrom(adiom.v1.Messages.WriteDataRequest other) { if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } + if (other.getTaskId() != 0) { + setTaskId(other.getTaskId()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -12784,6 +12819,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 24 + case 32: { + taskId_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -13010,6 +13050,38 @@ public Builder clearType() { return this; } + private int taskId_ ; + /** + * uint32 task_id = 4 [json_name = "taskId"]; + * @return The taskId. + */ + @java.lang.Override + public int getTaskId() { + return taskId_; + } + /** + * uint32 task_id = 4 [json_name = "taskId"]; + * @param value The taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskId(int value) { + + taskId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * uint32 task_id = 4 [json_name = "taskId"]; + * @return This builder for chaining. + */ + public Builder clearTaskId() { + bitField0_ = (bitField0_ & ~0x00000008); + taskId_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:adiom.v1.WriteDataRequest) } @@ -23923,54 +23995,55 @@ public adiom.v1.Messages.GetTransformResponse getDefaultInstanceForType() { "R\tpartition\022&\n\004type\030\002 \001(\0162\022.adiom.v1.Dat" + "aTypeR\004type\022\026\n\006cursor\030\003 \001(\014R\006cursor\"G\n\020L" + "istDataResponse\022\022\n\004data\030\001 \003(\014R\004data\022\037\n\013n" + - "ext_cursor\030\002 \001(\014R\nnextCursor\"l\n\020WriteDat" + - "aRequest\022\034\n\tnamespace\030\001 \001(\tR\tnamespace\022\022" + - "\n\004data\030\002 \003(\014R\004data\022&\n\004type\030\003 \001(\0162\022.adiom" + - ".v1.DataTypeR\004type\"\023\n\021WriteDataResponse\"" + - "\207\001\n\023WriteUpdatesRequest\022\034\n\tnamespace\030\001 \001" + - "(\tR\tnamespace\022*\n\007updates\030\002 \003(\0132\020.adiom.v" + - "1.UpdateR\007updates\022&\n\004type\030\003 \001(\0162\022.adiom." + - "v1.DataTypeR\004type\"\026\n\024WriteUpdatesRespons" + - "e\"v\n\024StreamUpdatesRequest\022\036\n\nnamespaces\030" + - "\001 \003(\tR\nnamespaces\022&\n\004type\030\002 \001(\0162\022.adiom." + - "v1.DataTypeR\004type\022\026\n\006cursor\030\003 \001(\014R\006curso" + - "r\"\262\001\n\025StreamUpdatesResponse\022*\n\007updates\030\001" + - " \003(\0132\020.adiom.v1.UpdateR\007updates\022\034\n\tnames" + - "pace\030\002 \001(\tR\tnamespace\022\037\n\013next_cursor\030\003 \001" + - "(\014R\nnextCursor\022.\n\004time\030\004 \001(\0132\032.google.pr" + - "otobuf.TimestampR\004time\"J\n\020StreamLSNReque" + - "st\022\036\n\nnamespaces\030\001 \003(\tR\nnamespaces\022\026\n\006cu" + - "rsor\030\002 \001(\014R\006cursor\"F\n\021StreamLSNResponse\022" + - "\020\n\003lsn\030\001 \001(\004R\003lsn\022\037\n\013next_cursor\030\002 \001(\014R\n" + - "nextCursor\"\031\n\027GetTransformInfoRequest\"\246\002" + - "\n\030GetTransformInfoResponse\022P\n\ntransforms" + - "\030\001 \003(\01320.adiom.v1.GetTransformInfoRespon" + - "se.TransformInfoR\ntransforms\0224\n\026use_mult" + - "iple_responses\030\002 \001(\010R\024useMultipleRespons" + - "es\032\201\001\n\rTransformInfo\0225\n\014request_type\030\001 \001" + - "(\0162\022.adiom.v1.DataTypeR\013requestType\0229\n\016r" + - "esponse_types\030\002 \003(\0162\022.adiom.v1.DataTypeR" + - "\rresponseTypes\"\343\001\n\023GetTransformRequest\022\034" + - "\n\tnamespace\030\001 \001(\tR\tnamespace\022*\n\007updates\030" + - "\002 \003(\0132\020.adiom.v1.UpdateR\007updates\022\022\n\004data" + - "\030\003 \003(\014R\004data\0225\n\014request_type\030\004 \001(\0162\022.adi" + - "om.v1.DataTypeR\013requestType\0227\n\rresponse_" + - "type\030\005 \001(\0162\022.adiom.v1.DataTypeR\014response" + - "Type\"q\n\021TransformResponse\022\034\n\tnamespace\030\001" + - " \001(\tR\tnamespace\022*\n\007updates\030\002 \003(\0132\020.adiom" + - ".v1.UpdateR\007updates\022\022\n\004data\030\003 \003(\014R\004data\"" + - "\257\001\n\024GetTransformResponse\022\034\n\tnamespace\030\001 " + + "ext_cursor\030\002 \001(\014R\nnextCursor\"\205\001\n\020WriteDa" + + "taRequest\022\034\n\tnamespace\030\001 \001(\tR\tnamespace\022" + + "\022\n\004data\030\002 \003(\014R\004data\022&\n\004type\030\003 \001(\0162\022.adio" + + "m.v1.DataTypeR\004type\022\027\n\007task_id\030\004 \001(\rR\006ta" + + "skId\"\023\n\021WriteDataResponse\"\207\001\n\023WriteUpdat" + + "esRequest\022\034\n\tnamespace\030\001 \001(\tR\tnamespace\022" + + "*\n\007updates\030\002 \003(\0132\020.adiom.v1.UpdateR\007upda" + + "tes\022&\n\004type\030\003 \001(\0162\022.adiom.v1.DataTypeR\004t" + + "ype\"\026\n\024WriteUpdatesResponse\"v\n\024StreamUpd" + + "atesRequest\022\036\n\nnamespaces\030\001 \003(\tR\nnamespa" + + "ces\022&\n\004type\030\002 \001(\0162\022.adiom.v1.DataTypeR\004t" + + "ype\022\026\n\006cursor\030\003 \001(\014R\006cursor\"\262\001\n\025StreamUp" + + "datesResponse\022*\n\007updates\030\001 \003(\0132\020.adiom.v" + + "1.UpdateR\007updates\022\034\n\tnamespace\030\002 \001(\tR\tna" + + "mespace\022\037\n\013next_cursor\030\003 \001(\014R\nnextCursor" + + "\022.\n\004time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mpR\004time\"J\n\020StreamLSNRequest\022\036\n\nnamespac" + + "es\030\001 \003(\tR\nnamespaces\022\026\n\006cursor\030\002 \001(\014R\006cu" + + "rsor\"F\n\021StreamLSNResponse\022\020\n\003lsn\030\001 \001(\004R\003" + + "lsn\022\037\n\013next_cursor\030\002 \001(\014R\nnextCursor\"\031\n\027" + + "GetTransformInfoRequest\"\246\002\n\030GetTransform" + + "InfoResponse\022P\n\ntransforms\030\001 \003(\01320.adiom" + + ".v1.GetTransformInfoResponse.TransformIn" + + "foR\ntransforms\0224\n\026use_multiple_responses" + + "\030\002 \001(\010R\024useMultipleResponses\032\201\001\n\rTransfo" + + "rmInfo\0225\n\014request_type\030\001 \001(\0162\022.adiom.v1." + + "DataTypeR\013requestType\0229\n\016response_types\030" + + "\002 \003(\0162\022.adiom.v1.DataTypeR\rresponseTypes" + + "\"\343\001\n\023GetTransformRequest\022\034\n\tnamespace\030\001 " + "\001(\tR\tnamespace\022*\n\007updates\030\002 \003(\0132\020.adiom." + - "v1.UpdateR\007updates\022\022\n\004data\030\003 \003(\014R\004data\0229" + - "\n\tresponses\030\004 \003(\0132\033.adiom.v1.TransformRe" + - "sponseR\tresponses*R\n\010DataType\022\025\n\021DATA_TY" + - "PE_UNKNOWN\020\000\022\030\n\024DATA_TYPE_MONGO_BSON\020\001\022\025" + - "\n\021DATA_TYPE_JSON_ID\020\002*\215\001\n\nUpdateType\022\027\n\023" + - "UPDATE_TYPE_UNKNOWN\020\000\022\026\n\022UPDATE_TYPE_INS" + - "ERT\020\001\022\026\n\022UPDATE_TYPE_UPDATE\020\002\022\026\n\022UPDATE_" + - "TYPE_DELETE\020\003\022\036\n\032UPDATE_TYPE_PARTIAL_UPD" + - "ATE\020\004B2Z0github.com/adiom-data/dsync/gen" + - "/adiom/v1;adiomv1b\006proto3" + "v1.UpdateR\007updates\022\022\n\004data\030\003 \003(\014R\004data\0225" + + "\n\014request_type\030\004 \001(\0162\022.adiom.v1.DataType" + + "R\013requestType\0227\n\rresponse_type\030\005 \001(\0162\022.a" + + "diom.v1.DataTypeR\014responseType\"q\n\021Transf" + + "ormResponse\022\034\n\tnamespace\030\001 \001(\tR\tnamespac" + + "e\022*\n\007updates\030\002 \003(\0132\020.adiom.v1.UpdateR\007up" + + "dates\022\022\n\004data\030\003 \003(\014R\004data\"\257\001\n\024GetTransfo" + + "rmResponse\022\034\n\tnamespace\030\001 \001(\tR\tnamespace" + + "\022*\n\007updates\030\002 \003(\0132\020.adiom.v1.UpdateR\007upd" + + "ates\022\022\n\004data\030\003 \003(\014R\004data\0229\n\tresponses\030\004 " + + "\003(\0132\033.adiom.v1.TransformResponseR\trespon" + + "ses*R\n\010DataType\022\025\n\021DATA_TYPE_UNKNOWN\020\000\022\030" + + "\n\024DATA_TYPE_MONGO_BSON\020\001\022\025\n\021DATA_TYPE_JS" + + "ON_ID\020\002*\215\001\n\nUpdateType\022\027\n\023UPDATE_TYPE_UN" + + "KNOWN\020\000\022\026\n\022UPDATE_TYPE_INSERT\020\001\022\026\n\022UPDAT" + + "E_TYPE_UPDATE\020\002\022\026\n\022UPDATE_TYPE_DELETE\020\003\022" + + "\036\n\032UPDATE_TYPE_PARTIAL_UPDATE\020\004B2Z0githu" + + "b.com/adiom-data/dsync/gen/adiom/v1;adio" + + "mv1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -24072,7 +24145,7 @@ public adiom.v1.Messages.GetTransformResponse getDefaultInstanceForType() { internal_static_adiom_v1_WriteDataRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_adiom_v1_WriteDataRequest_descriptor, - new java.lang.String[] { "Namespace", "Data", "Type", }); + new java.lang.String[] { "Namespace", "Data", "Type", "TaskId", }); internal_static_adiom_v1_WriteDataResponse_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_adiom_v1_WriteDataResponse_fieldAccessorTable = new diff --git a/proto/adiom/v1/messages.proto b/proto/adiom/v1/messages.proto index e3ebe8e1..298d81a4 100644 --- a/proto/adiom/v1/messages.proto +++ b/proto/adiom/v1/messages.proto @@ -124,6 +124,7 @@ message WriteDataRequest { string namespace = 1; repeated bytes data = 2; DataType type = 3; + uint32 task_id = 4; } message WriteDataResponse {} diff --git a/protocol/iface/transport.go b/protocol/iface/transport.go index c2f0a030..b324ff09 100644 --- a/protocol/iface/transport.go +++ b/protocol/iface/transport.go @@ -25,6 +25,7 @@ type DataMessage struct { Id []*adiomv1.BsonValue //required except for batch inserts (for efficiency) SeqNum int64 //optional field to provide a global ordering of messages + TaskId uint // Task ID for associating data messages with tasks // header for barriers (task completion signals) // combining them in a single struct to allow for a single channel for both data and barriers // for barriers MutationType will be set to MutationType_Barrier