Skip to content

Commit dfe0941

Browse files
authored
chore: update function protos as we implement (#322)
1 parent 600632c commit dfe0941

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

proto/function.proto

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ message _PutWasmRequest {
4949
// Optional description for the Wasm. You can use this to keep some notes about this Wasm
5050
string description = 2;
5151
oneof wasm_put_kind {
52-
// The wasm for the wasm are here in the message
52+
// The bytes for the wasm are here in the message
5353
bytes inline = 22;
5454
// No bytes change necessary, just changing the metadata of the record (description, display name, etc.)
5555
_MetadataOnly metadata_only = 24;
@@ -66,6 +66,8 @@ message _ListWasmsRequest {
6666
}
6767

6868
message _ListFunctionsRequest {
69+
// The cache to list functions in.
70+
string cache_name = 1;
6971
}
7072

7173
message _ListFunctionVersionsRequest {

proto/function_types.proto

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package function_types;
44

55
// A Function is an extension of Momento; for users to build their own Momento apis.
66
message _Function {
7-
// This unique identifier should change when a function's metadata is updated.
8-
_FunctionId id = 1;
7+
// This is an immutable unique identifier for the function, across versions.
8+
string function_id = 1;
99

1010
// The name of the function.
1111
string name = 2;
@@ -14,7 +14,7 @@ message _Function {
1414
string description = 3;
1515

1616
// What is the current version of the function set to use upon invocation?
17-
_CurrentFunctionVersion current_version = 4;
17+
_CurrentFunctionVersion current_version = 4;
1818

1919
// What is the actual latest version of the function?
2020
uint32 latest_version = 5;
@@ -56,28 +56,28 @@ message _EnvironmentValue {
5656
// In this way, we can manage Templates independently of concrete user Functions, and users can
5757
// reuse their wasms across multiple Functions (which would be different configurations).
5858
message _Wasm {
59-
// The globally unique identifier tuple for this wasm.
60-
// It may be a shared ID, as in the case of a Template Function, or it may be
61-
// unique to one Function.
62-
_WasmId id = 1;
59+
// The globally unique identifier tuple for this wasm.
60+
// It may be a shared ID, as in the case of a Template Function, or it may be
61+
// unique to one Function.
62+
_WasmId id = 1;
6363

64-
// The display name of the wasm.
65-
string display_name = 2;
64+
// The name of the wasm.
65+
string name = 2;
6666

67-
// The description of the wasm.
68-
string description = 3;
67+
// The description of the wasm.
68+
string description = 3;
6969
}
7070

7171
message _FunctionId {
72-
// Globally unique id, this is stable across versions of the Function.
73-
string id = 1;
74-
// A sub-id of sorts. Together with the id, this is a unique identifier for a function configuration.
75-
uint32 version = 2;
72+
// Globally unique id, this is stable across versions of the Function.
73+
string id = 1;
74+
// A sub-id of sorts. Together with the id, this is a unique identifier for a function configuration.
75+
uint32 version = 2;
7676
}
7777

7878
message _WasmId {
79-
// Globally unique id, this is stable across versions of the wasm.
80-
string id = 1;
81-
// A sub-id of sorts. Together with the id, this is a unique identifier for a wasm binary.
82-
uint32 version = 2;
83-
}
79+
// Globally unique id, this is stable across versions of the wasm.
80+
string id = 1;
81+
// A sub-id of sorts. Together with the id, this is a unique identifier for a wasm binary.
82+
uint32 version = 2;
83+
}

0 commit comments

Comments
 (0)