-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntime.proto
More file actions
167 lines (133 loc) · 4.69 KB
/
Copy pathruntime.proto
File metadata and controls
167 lines (133 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
syntax = "proto3";
package spec.proto.runtime.v1;
import "google/protobuf/empty.proto";
import "google/protobuf/any.proto";
option go_package = "group.rxcloud/capa/pkg/proto/runtime/v1;v1";
option java_outer_classname = "RuntimeProto";
option java_package = "spec.proto.runtime.v1";
service Runtime {
// SayHello used for test
rpc SayHello(SayHelloRequest) returns (SayHelloResponse) {}
// Register an actor timer.
rpc RegisterActorTimer(RegisterActorTimerRequest) returns (google.protobuf.Empty) {}
// Unregister an actor timer.
rpc UnregisterActorTimer(UnregisterActorTimerRequest) returns (google.protobuf.Empty) {}
// Register an actor reminder.
rpc RegisterActorReminder(RegisterActorReminderRequest) returns (google.protobuf.Empty) {}
// Unregister an actor reminder.
rpc UnregisterActorReminder(UnregisterActorReminderRequest) returns (google.protobuf.Empty) {}
// Rename an actor reminder.
rpc RenameActorReminder(RenameActorReminderRequest) returns (google.protobuf.Empty) {}
// Gets the state for a specific actor.
rpc GetActorState(GetActorStateRequest) returns (GetActorStateResponse) {}
// Executes state transactions for a specified actor
rpc ExecuteActorStateTransaction(ExecuteActorStateTransactionRequest) returns (google.protobuf.Empty) {}
// InvokeActor calls a method on an actor.
rpc InvokeActor (InvokeActorRequest) returns (InvokeActorResponse) {}
// Gets metadata of the sidecar
rpc GetMetadata (google.protobuf.Empty) returns (GetMetadataResponse) {}
// Sets value in extended metadata of the sidecar
rpc SetMetadata (SetMetadataRequest) returns (google.protobuf.Empty) {}
// Shutdown the sidecar
rpc Shutdown (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
message SayHelloRequest {
// Say hello to sidecar
string service_name = 1;
string name = 2;
// Optional. This field is used to control the packet size during load tests.
google.protobuf.Any data = 3;
}
message SayHelloResponse {
// The hello from sidecar
string hello = 1;
// The data returned from an external system
google.protobuf.Any data = 2;
}
// RegisterActorTimerRequest is the message to register a timer for an actor of a given type and id.
message RegisterActorTimerRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
string due_time = 4;
string period = 5;
string callback = 6;
bytes data = 7;
string ttl = 8;
}
// UnregisterActorTimerRequest is the message to unregister an actor timer
message UnregisterActorTimerRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
}
// RegisterActorReminderRequest is the message to register a reminder for an actor of a given type and id.
message RegisterActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
string due_time = 4;
string period = 5;
bytes data = 6;
string ttl = 7;
}
// UnregisterActorReminderRequest is the message to unregister an actor reminder.
message UnregisterActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
}
// RenameActorReminderRequest is the message to rename an actor reminder.
message RenameActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string old_name = 3;
string new_name = 4;
}
// GetActorStateRequest is the message to get key-value states from specific actor.
message GetActorStateRequest {
string actor_type = 1;
string actor_id = 2;
string key = 3;
}
// GetActorStateResponse is the response conveying the actor's state value.
message GetActorStateResponse {
bytes data = 1;
}
// ExecuteActorStateTransactionRequest is the message to execute multiple operations on a specified actor.
message ExecuteActorStateTransactionRequest {
string actor_type = 1;
string actor_id = 2;
repeated TransactionalActorStateOperation operations = 3;
}
// TransactionalActorStateOperation is the message to execute a specified operation with a key-value pair.
message TransactionalActorStateOperation {
string operationType = 1;
string key = 2;
google.protobuf.Any value = 3;
}
// InvokeActorRequest is the message to call an actor.
message InvokeActorRequest {
string actor_type = 1;
string actor_id = 2;
string method = 3;
bytes data = 4;
}
// InvokeActorResponse is the method that returns an actor invocation response.
message InvokeActorResponse {
bytes data = 1;
}
message SetMetadataRequest {
string key = 1;
string value = 2;
}
// GetMetadataResponse is a message that is returned on GetMetadata rpc call
message GetMetadataResponse {
string id = 1;
repeated ActiveActorsCount active_actors_count = 2;
map<string, string> extended_metadata = 4;
}
message ActiveActorsCount {
string type = 1;
int32 count = 2;
}