-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add proto definition for UDF input.
This represents the input in server code or RPC request. i.e., the RPC request will contain these for clients to pass input to UDFs. Bug: 303835821 Change-Id: Ie38c44f0b66dad20fcf1ce9c17e40c1fc6dffee8 GitOrigin-RevId: 670aa81de2b79fc1348c07240d1244211c203fce
- Loading branch information
1 parent
b809804
commit 3e65ef1
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package kv_server; | ||
|
||
import "google/protobuf/struct.proto"; | ||
|
||
// This file contains types that may be used in either request/response or UDF. | ||
// This is always the first argument to the UDF and is the only argument that | ||
// the KV server is not oblivious to. Example use cases are to pass server side | ||
// flags or parameters. | ||
message UDFExecutionMetadata {} | ||
|
||
// Context useful for logging and debugging requests compatible with the Bidding | ||
// and Auction service. | ||
message LogContext { | ||
// UUID for the request (as originating from client). | ||
string generation_id = 1; | ||
string adtech_debug_id = 2; | ||
} | ||
|
||
message ConsentedDebugConfiguration { | ||
bool is_consented = 1; | ||
string token = 2; | ||
} | ||
|
||
// Represents one argument to UDF. One UDF invocation may have multiple | ||
// arguments. The actual meaning and number of the arguments are defined by the | ||
// specific use case of the KV server. i.e., different use cases will have API | ||
// overlay which will specify the argument spec. UDF authors is responsible of | ||
// writing the UDF to conform to the use case specific API. | ||
// | ||
// If `tags` is not empty, the argument will be passed to the UDF | ||
// with 2 fields: "tags" and "data". Otherwise, the content of `data` will be | ||
// directly passed as the argument. | ||
message SingleUDFArgument { | ||
// optional. Metadata about the data. | ||
google.protobuf.ListValue tags = 1; | ||
|
||
// required. Data of the input argument. | ||
google.protobuf.Value data = 2; | ||
} |