@cofy-x/axern-sdk 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -52
- package/dist/client/index.d.ts +12 -11
- package/dist/client/index.js +64 -65
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +2 -4
- package/dist/generated/proto.js +0 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -2
- package/dist/network-policy.d.ts +41 -0
- package/dist/network-policy.js +132 -0
- package/dist/node/attached_process.d.ts +1 -2
- package/dist/node/attached_process.js +12 -26
- package/dist/node/client.d.ts +4 -6
- package/dist/node/client.js +2 -9
- package/dist/node/exec.d.ts +1 -3
- package/dist/node/exec.js +0 -43
- package/dist/proto/axern/control/admin/v1/access.proto +12 -5
- package/dist/proto/axern/control/admin/v1/audit.proto +14 -16
- package/dist/proto/axern/control/admin/v1/node.proto +23 -67
- package/dist/proto/axern/control/admin/v1/reliability.proto +11 -78
- package/dist/proto/axern/control/capability/v1/capability.proto +35 -90
- package/dist/proto/axern/control/common/v1/common.proto +72 -102
- package/dist/proto/axern/control/environment/v1/environment.proto +42 -26
- package/dist/proto/axern/control/gateway/v1/gateway.proto +18 -59
- package/dist/proto/axern/control/identity/v1/identity.proto +1 -1
- package/dist/proto/axern/control/namespace/v1/namespace.proto +2 -3
- package/dist/proto/axern/control/quota/v1/quota.proto +22 -32
- package/dist/proto/axern/control/run/v1/run.proto +26 -22
- package/dist/proto/axern/control/secret/v1/secret.proto +1 -3
- package/dist/proto/axern/control/tunnel/v1/tunnel.proto +18 -25
- package/dist/proto/axern/node/sandbox/v1/node.proto +59 -375
- package/dist/sandbox/index.d.ts +5 -9
- package/dist/sandbox/index.js +14 -22
- package/dist/sandbox/lifecycle.d.ts +1 -1
- package/dist/sandbox/lifecycle.js +55 -17
- package/dist/tunnel/connector.js +1 -1
- package/dist/tunnel/control.d.ts +0 -1
- package/dist/tunnel/control.js +0 -1
- package/dist/tunnel/runtime.d.ts +0 -1
- package/dist/tunnel/runtime.js +0 -1
- package/dist/tunnel/types.d.ts +0 -1
- package/dist/types.d.ts +4 -21
- package/dist/types.js +1 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/proto/axern/control/admin/v1/allocation_lifecycle.proto +0 -91
- package/dist/proto/axern/control/admin/v1/service.proto +0 -18
- package/dist/proto/axern/control/admin/v1/storage.proto +0 -81
- package/dist/proto/axern/control/agentprofile/v1/agent_profile.proto +0 -169
- package/dist/proto/axern/control/catalog/v1/catalog.proto +0 -127
- package/dist/proto/axern/control/function/v1/function.proto +0 -130
- package/dist/proto/axern/control/function/v1/function_types.proto +0 -233
- package/dist/proto/axern/control/node/v1/node_control.proto +0 -443
- package/dist/proto/axern/control/rollout/v1/rollout.proto +0 -344
- package/dist/proto/axern/control/service/v1/service.proto +0 -96
- package/dist/proto/axern/control/service/v1/service_event.proto +0 -47
- package/dist/proto/axern/control/service/v1/service_replica.proto +0 -78
- package/dist/proto/axern/control/service/v1/service_types.proto +0 -155
- package/dist/proto/axern/control/storage/v1/storage.proto +0 -107
- package/dist/proto/axern/control/storage/v1/storage_types.proto +0 -125
- package/dist/proto/axern/data/artifact/v1/artifact.proto +0 -19
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.agentprofile.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/agentprofile/v1;agentprofilev1";
|
|
6
|
-
|
|
7
|
-
import "google/protobuf/timestamp.proto";
|
|
8
|
-
|
|
9
|
-
enum AgentProvider {
|
|
10
|
-
AGENT_PROVIDER_UNSPECIFIED = 0;
|
|
11
|
-
AGENT_PROVIDER_OPENAI = 1;
|
|
12
|
-
AGENT_PROVIDER_ANTHROPIC = 2;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
enum AgentWireApi {
|
|
16
|
-
AGENT_WIRE_API_UNSPECIFIED = 0;
|
|
17
|
-
AGENT_WIRE_API_OPENAI_RESPONSES = 1;
|
|
18
|
-
AGENT_WIRE_API_ANTHROPIC_MESSAGES = 2;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
message AgentProfileSpec {
|
|
22
|
-
string agent = 1;
|
|
23
|
-
AgentProvider provider = 2;
|
|
24
|
-
AgentWireApi wire_api = 3;
|
|
25
|
-
string base_url = 4;
|
|
26
|
-
int32 max_concurrency = 5;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
message AgentProfile {
|
|
30
|
-
string id = 1;
|
|
31
|
-
string namespace = 2;
|
|
32
|
-
string name = 3;
|
|
33
|
-
AgentProfileSpec spec = 4;
|
|
34
|
-
map<string, string> labels = 5;
|
|
35
|
-
int64 version = 6;
|
|
36
|
-
int64 credential_version = 7;
|
|
37
|
-
google.protobuf.Timestamp created_at = 8;
|
|
38
|
-
google.protobuf.Timestamp updated_at = 9;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
message AgentProfileListFilter {
|
|
42
|
-
string namespace = 1;
|
|
43
|
-
string agent = 2;
|
|
44
|
-
AgentProvider provider = 3;
|
|
45
|
-
map<string, string> labels = 4;
|
|
46
|
-
string cursor = 5;
|
|
47
|
-
int32 page_size = 6;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
message CreateAgentProfileRequest {
|
|
51
|
-
string namespace = 1;
|
|
52
|
-
string name = 2;
|
|
53
|
-
AgentProfileSpec spec = 3;
|
|
54
|
-
map<string, string> labels = 4;
|
|
55
|
-
bytes credential = 5;
|
|
56
|
-
string idempotency_key = 6;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
message CreateAgentProfileResponse {
|
|
60
|
-
AgentProfile profile = 1;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
message GetAgentProfileRequest {
|
|
64
|
-
string namespace = 1;
|
|
65
|
-
string name = 2;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
message GetAgentProfileResponse {
|
|
69
|
-
AgentProfile profile = 1;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
message ListAgentProfilesRequest {
|
|
73
|
-
AgentProfileListFilter filter = 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message ListAgentProfilesResponse {
|
|
77
|
-
repeated AgentProfile profiles = 1;
|
|
78
|
-
string next_cursor = 2;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
message AgentProfilePatch {
|
|
82
|
-
optional string base_url = 1;
|
|
83
|
-
optional int32 max_concurrency = 2;
|
|
84
|
-
map<string, string> labels = 3;
|
|
85
|
-
bool replace_labels = 4;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
message UpdateAgentProfileRequest {
|
|
89
|
-
string namespace = 1;
|
|
90
|
-
string name = 2;
|
|
91
|
-
AgentProfilePatch patch = 3;
|
|
92
|
-
int64 expected_version = 4;
|
|
93
|
-
string idempotency_key = 5;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
message UpdateAgentProfileResponse {
|
|
97
|
-
AgentProfile profile = 1;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
message RotateAgentProfileCredentialRequest {
|
|
101
|
-
string namespace = 1;
|
|
102
|
-
string name = 2;
|
|
103
|
-
bytes credential = 3;
|
|
104
|
-
int64 expected_version = 4;
|
|
105
|
-
string idempotency_key = 5;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
message RotateAgentProfileCredentialResponse {
|
|
109
|
-
AgentProfile profile = 1;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
enum ProfileCheckKind {
|
|
113
|
-
PROFILE_CHECK_KIND_UNSPECIFIED = 0;
|
|
114
|
-
PROFILE_CHECK_KIND_CONFIGURATION = 1;
|
|
115
|
-
PROFILE_CHECK_KIND_CREDENTIAL = 2;
|
|
116
|
-
PROFILE_CHECK_KIND_WORKER_CAPABILITY = 3;
|
|
117
|
-
PROFILE_CHECK_KIND_PROVIDER_AUTHENTICATION = 4;
|
|
118
|
-
PROFILE_CHECK_KIND_WIRE_API = 5;
|
|
119
|
-
PROFILE_CHECK_KIND_MODEL = 6;
|
|
120
|
-
PROFILE_CHECK_KIND_LATENCY = 7;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
enum ProfileCheckStatus {
|
|
124
|
-
PROFILE_CHECK_STATUS_UNSPECIFIED = 0;
|
|
125
|
-
PROFILE_CHECK_STATUS_PASS = 1;
|
|
126
|
-
PROFILE_CHECK_STATUS_WARN = 2;
|
|
127
|
-
PROFILE_CHECK_STATUS_FAIL = 3;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
message ProfileCheck {
|
|
131
|
-
ProfileCheckKind kind = 1;
|
|
132
|
-
ProfileCheckStatus status = 2;
|
|
133
|
-
string code = 3;
|
|
134
|
-
string message = 4;
|
|
135
|
-
bool retryable = 5;
|
|
136
|
-
int64 latency_ms = 6;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
message DoctorAgentProfileRequest {
|
|
140
|
-
string namespace = 1;
|
|
141
|
-
string name = 2;
|
|
142
|
-
string model = 3;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
message DoctorAgentProfileResponse {
|
|
146
|
-
AgentProfile profile = 1;
|
|
147
|
-
repeated ProfileCheck checks = 2;
|
|
148
|
-
bool healthy = 3;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
message DeleteAgentProfileRequest {
|
|
152
|
-
string namespace = 1;
|
|
153
|
-
string name = 2;
|
|
154
|
-
int64 expected_version = 3;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
message DeleteAgentProfileResponse {
|
|
158
|
-
AgentProfile profile = 1;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
service AgentProfileControl {
|
|
162
|
-
rpc CreateAgentProfile(CreateAgentProfileRequest) returns (CreateAgentProfileResponse) {}
|
|
163
|
-
rpc GetAgentProfile(GetAgentProfileRequest) returns (GetAgentProfileResponse) {}
|
|
164
|
-
rpc ListAgentProfiles(ListAgentProfilesRequest) returns (ListAgentProfilesResponse) {}
|
|
165
|
-
rpc UpdateAgentProfile(UpdateAgentProfileRequest) returns (UpdateAgentProfileResponse) {}
|
|
166
|
-
rpc RotateAgentProfileCredential(RotateAgentProfileCredentialRequest) returns (RotateAgentProfileCredentialResponse) {}
|
|
167
|
-
rpc DoctorAgentProfile(DoctorAgentProfileRequest) returns (DoctorAgentProfileResponse) {}
|
|
168
|
-
rpc DeleteAgentProfile(DeleteAgentProfileRequest) returns (DeleteAgentProfileResponse) {}
|
|
169
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.catalog.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/catalog/v1;catalogv1";
|
|
6
|
-
|
|
7
|
-
message RuntimeMount {
|
|
8
|
-
string type = 1;
|
|
9
|
-
string source = 2;
|
|
10
|
-
string target = 3;
|
|
11
|
-
repeated string options = 4;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
message RuntimeTemplateCapabilities {
|
|
15
|
-
bool supports_exec = 1;
|
|
16
|
-
bool supports_exec_stream = 2;
|
|
17
|
-
bool supports_long_lived_process = 3;
|
|
18
|
-
bool supports_ports = 4;
|
|
19
|
-
bool supports_computer_use = 5;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
message OciImageDescriptor {
|
|
23
|
-
string digest = 1;
|
|
24
|
-
string media_type = 2;
|
|
25
|
-
int64 size_bytes = 3;
|
|
26
|
-
map<string, string> annotations = 4;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
message RuntimeBaselinePolicy {
|
|
30
|
-
repeated string capabilities = 1;
|
|
31
|
-
uint64 no_file_limit = 2;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
message RuntimeCapabilityPolicy {
|
|
35
|
-
string annotation_key = 1;
|
|
36
|
-
optional bool include_ambient = 2;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
message RuntimeNetworkNamespacePolicy {
|
|
40
|
-
string annotation_key = 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
message RuntimeResourcePolicy {
|
|
44
|
-
repeated string ignore_annotation_keys = 1;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message RuntimeExecutionProfile {
|
|
48
|
-
RuntimeBaselinePolicy runtime_baseline = 1;
|
|
49
|
-
RuntimeCapabilityPolicy capabilities = 2;
|
|
50
|
-
RuntimeNetworkNamespacePolicy network_namespace = 3;
|
|
51
|
-
RuntimeResourcePolicy resources = 4;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
message RuntimeTemplate {
|
|
55
|
-
string id = 1;
|
|
56
|
-
bool rootfs_readonly = 2;
|
|
57
|
-
// Informational image default command, usually OCI Entrypoint + Cmd for
|
|
58
|
-
// built-in templates. Workloads with no explicit argv preserve the image
|
|
59
|
-
// default at node runtime instead of using this field as a control-plane
|
|
60
|
-
// bootstrap override.
|
|
61
|
-
repeated string image_default_argv = 3;
|
|
62
|
-
string default_cwd = 4;
|
|
63
|
-
map<string, string> default_env = 5;
|
|
64
|
-
repeated RuntimeMount mounts = 6;
|
|
65
|
-
RuntimeTemplateCapabilities capabilities = 7;
|
|
66
|
-
string language = 8;
|
|
67
|
-
string language_version = 9;
|
|
68
|
-
string description = 10;
|
|
69
|
-
string version = 11;
|
|
70
|
-
OciImageDescriptor image_descriptor = 12;
|
|
71
|
-
string warm_policy = 13;
|
|
72
|
-
string cache_policy = 14;
|
|
73
|
-
RuntimeExecutionProfile execution_profile = 15;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message ListRuntimeTemplatesRequest {
|
|
77
|
-
string namespace = 1;
|
|
78
|
-
string version = 2;
|
|
79
|
-
string language = 3;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
message ListRuntimeTemplatesResponse {
|
|
83
|
-
repeated RuntimeTemplate runtime_templates = 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
message GetRuntimeTemplateRequest {
|
|
87
|
-
string id = 1;
|
|
88
|
-
string version = 2;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
message GetRuntimeTemplateResponse {
|
|
92
|
-
RuntimeTemplate runtime_template = 1;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// AgentBundle describes a relocatable, read-only agent tool image. The image
|
|
96
|
-
// is mounted into a workload rootfs; it is not itself a runtime template.
|
|
97
|
-
message AgentBundle {
|
|
98
|
-
string id = 1;
|
|
99
|
-
string version = 2;
|
|
100
|
-
OciImageDescriptor image_descriptor = 3;
|
|
101
|
-
string binary_path = 4;
|
|
102
|
-
string description = 5;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
message ListAgentBundlesRequest {
|
|
106
|
-
string version = 1;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
message ListAgentBundlesResponse {
|
|
110
|
-
repeated AgentBundle agent_bundles = 1;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
message GetAgentBundleRequest {
|
|
114
|
-
string id = 1;
|
|
115
|
-
string version = 2;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
message GetAgentBundleResponse {
|
|
119
|
-
AgentBundle agent_bundle = 1;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
service RuntimeCatalog {
|
|
123
|
-
rpc ListRuntimeTemplates(ListRuntimeTemplatesRequest) returns (ListRuntimeTemplatesResponse) {}
|
|
124
|
-
rpc GetRuntimeTemplate(GetRuntimeTemplateRequest) returns (GetRuntimeTemplateResponse) {}
|
|
125
|
-
rpc ListAgentBundles(ListAgentBundlesRequest) returns (ListAgentBundlesResponse) {}
|
|
126
|
-
rpc GetAgentBundle(GetAgentBundleRequest) returns (GetAgentBundleResponse) {}
|
|
127
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.function.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/function/v1;functionv1";
|
|
6
|
-
|
|
7
|
-
import "axern/control/function/v1/function_types.proto";
|
|
8
|
-
import "google/protobuf/duration.proto";
|
|
9
|
-
|
|
10
|
-
message UploadFunctionBundleOpen {
|
|
11
|
-
string namespace = 1;
|
|
12
|
-
string name = 2;
|
|
13
|
-
string digest = 3;
|
|
14
|
-
string media_type = 4;
|
|
15
|
-
int64 size_bytes = 5;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
message UploadFunctionBundleRequest {
|
|
19
|
-
oneof request {
|
|
20
|
-
UploadFunctionBundleOpen open = 1;
|
|
21
|
-
bytes chunk = 2;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
message UploadFunctionBundleResponse {
|
|
26
|
-
FunctionBundleSource bundle = 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
message DeployFunctionRequest {
|
|
30
|
-
string namespace = 1;
|
|
31
|
-
string name = 2;
|
|
32
|
-
FunctionSpec spec = 3;
|
|
33
|
-
FunctionSource source = 4;
|
|
34
|
-
map<string, string> labels = 5;
|
|
35
|
-
bool wait_ready = 6;
|
|
36
|
-
google.protobuf.Duration ready_timeout = 7;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
message DeployFunctionResponse {
|
|
40
|
-
Function function = 1;
|
|
41
|
-
FunctionRevision revision = 2;
|
|
42
|
-
FunctionDeployment deployment = 3;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
message GetFunctionRequest {
|
|
46
|
-
string function_id = 1;
|
|
47
|
-
string namespace = 2;
|
|
48
|
-
string name = 3;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
message GetFunctionResponse {
|
|
52
|
-
Function function = 1;
|
|
53
|
-
FunctionRevision active_revision = 2;
|
|
54
|
-
FunctionDeployment deployment = 3;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
message ListFunctionsRequest {
|
|
58
|
-
FunctionListFilter filter = 1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
message ListFunctionsResponse {
|
|
62
|
-
repeated Function functions = 1;
|
|
63
|
-
string next_cursor = 2;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
message DeleteFunctionRequest {
|
|
67
|
-
string function_id = 1;
|
|
68
|
-
string namespace = 2;
|
|
69
|
-
string name = 3;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
message DeleteFunctionResponse {
|
|
73
|
-
Function function = 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message InvokeFunctionRequest {
|
|
77
|
-
string namespace = 1;
|
|
78
|
-
string name = 2;
|
|
79
|
-
string function_id = 3;
|
|
80
|
-
string revision_id = 4;
|
|
81
|
-
FunctionInvocationMode mode = 5;
|
|
82
|
-
FunctionPayload payload = 6;
|
|
83
|
-
google.protobuf.Duration timeout = 7;
|
|
84
|
-
string request_id = 8;
|
|
85
|
-
map<string, string> labels = 9;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
message InvokeFunctionResponse {
|
|
89
|
-
FunctionInvocation invocation = 1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
message GetFunctionInvocationRequest {
|
|
93
|
-
string invocation_id = 1;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
message GetFunctionInvocationResponse {
|
|
97
|
-
FunctionInvocation invocation = 1;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
message ListFunctionInvocationsRequest {
|
|
101
|
-
FunctionInvocationListFilter filter = 1;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
message ListFunctionInvocationsResponse {
|
|
105
|
-
repeated FunctionInvocation invocations = 1;
|
|
106
|
-
string next_cursor = 2;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
message ListFunctionEventsRequest {
|
|
110
|
-
string function_id = 1;
|
|
111
|
-
string invocation_id = 2;
|
|
112
|
-
string revision_id = 3;
|
|
113
|
-
int32 limit = 4;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
message ListFunctionEventsResponse {
|
|
117
|
-
repeated FunctionEvent events = 1;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
service FunctionControl {
|
|
121
|
-
rpc UploadFunctionBundle(stream UploadFunctionBundleRequest) returns (UploadFunctionBundleResponse) {}
|
|
122
|
-
rpc DeployFunction(DeployFunctionRequest) returns (DeployFunctionResponse) {}
|
|
123
|
-
rpc GetFunction(GetFunctionRequest) returns (GetFunctionResponse) {}
|
|
124
|
-
rpc ListFunctions(ListFunctionsRequest) returns (ListFunctionsResponse) {}
|
|
125
|
-
rpc DeleteFunction(DeleteFunctionRequest) returns (DeleteFunctionResponse) {}
|
|
126
|
-
rpc InvokeFunction(InvokeFunctionRequest) returns (InvokeFunctionResponse) {}
|
|
127
|
-
rpc GetFunctionInvocation(GetFunctionInvocationRequest) returns (GetFunctionInvocationResponse) {}
|
|
128
|
-
rpc ListFunctionInvocations(ListFunctionInvocationsRequest) returns (ListFunctionInvocationsResponse) {}
|
|
129
|
-
rpc ListFunctionEvents(ListFunctionEventsRequest) returns (ListFunctionEventsResponse) {}
|
|
130
|
-
}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.function.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/function/v1;functionv1";
|
|
6
|
-
|
|
7
|
-
import "axern/control/common/v1/common.proto";
|
|
8
|
-
import "axern/control/environment/v1/environment.proto";
|
|
9
|
-
import "google/protobuf/duration.proto";
|
|
10
|
-
import "google/protobuf/timestamp.proto";
|
|
11
|
-
|
|
12
|
-
enum FunctionStatus {
|
|
13
|
-
FUNCTION_STATUS_UNSPECIFIED = 0;
|
|
14
|
-
FUNCTION_STATUS_DEPLOYING = 1;
|
|
15
|
-
FUNCTION_STATUS_READY = 2;
|
|
16
|
-
FUNCTION_STATUS_DEGRADED = 3;
|
|
17
|
-
FUNCTION_STATUS_FAILED = 4;
|
|
18
|
-
FUNCTION_STATUS_DELETING = 5;
|
|
19
|
-
FUNCTION_STATUS_DELETED = 6;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
enum FunctionDeploymentStatus {
|
|
23
|
-
FUNCTION_DEPLOYMENT_STATUS_UNSPECIFIED = 0;
|
|
24
|
-
FUNCTION_DEPLOYMENT_STATUS_PENDING = 1;
|
|
25
|
-
FUNCTION_DEPLOYMENT_STATUS_WARMING = 2;
|
|
26
|
-
FUNCTION_DEPLOYMENT_STATUS_READY = 3;
|
|
27
|
-
FUNCTION_DEPLOYMENT_STATUS_SCALED_TO_ZERO = 4;
|
|
28
|
-
FUNCTION_DEPLOYMENT_STATUS_DEGRADED = 5;
|
|
29
|
-
FUNCTION_DEPLOYMENT_STATUS_FAILED = 6;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
enum FunctionInvocationStatus {
|
|
33
|
-
FUNCTION_INVOCATION_STATUS_UNSPECIFIED = 0;
|
|
34
|
-
FUNCTION_INVOCATION_STATUS_ACCEPTED = 1;
|
|
35
|
-
FUNCTION_INVOCATION_STATUS_QUEUED = 2;
|
|
36
|
-
FUNCTION_INVOCATION_STATUS_RUNNING = 3;
|
|
37
|
-
FUNCTION_INVOCATION_STATUS_SUCCEEDED = 4;
|
|
38
|
-
FUNCTION_INVOCATION_STATUS_FAILED = 5;
|
|
39
|
-
FUNCTION_INVOCATION_STATUS_CANCELLED = 6;
|
|
40
|
-
FUNCTION_INVOCATION_STATUS_TIMED_OUT = 7;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
enum FunctionInvocationMode {
|
|
44
|
-
FUNCTION_INVOCATION_MODE_UNSPECIFIED = 0;
|
|
45
|
-
FUNCTION_INVOCATION_MODE_SYNC = 1;
|
|
46
|
-
FUNCTION_INVOCATION_MODE_ASYNC = 2;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
enum FunctionEventType {
|
|
50
|
-
FUNCTION_EVENT_TYPE_UNSPECIFIED = 0;
|
|
51
|
-
FUNCTION_EVENT_TYPE_DEPLOY_STARTED = 1;
|
|
52
|
-
FUNCTION_EVENT_TYPE_REVISION_CREATED = 2;
|
|
53
|
-
FUNCTION_EVENT_TYPE_REVISION_ACTIVATED = 3;
|
|
54
|
-
FUNCTION_EVENT_TYPE_WARM_POOL_READY = 4;
|
|
55
|
-
FUNCTION_EVENT_TYPE_INVOCATION_STARTED = 5;
|
|
56
|
-
FUNCTION_EVENT_TYPE_INVOCATION_SUCCEEDED = 6;
|
|
57
|
-
FUNCTION_EVENT_TYPE_INVOCATION_FAILED = 7;
|
|
58
|
-
FUNCTION_EVENT_TYPE_SCALING_DECISION = 8;
|
|
59
|
-
FUNCTION_EVENT_TYPE_CLEANUP = 9;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
message Function {
|
|
63
|
-
string id = 1;
|
|
64
|
-
string namespace = 2;
|
|
65
|
-
string name = 3;
|
|
66
|
-
string active_revision_id = 4;
|
|
67
|
-
FunctionSpec spec = 5;
|
|
68
|
-
FunctionStatus status = 6;
|
|
69
|
-
FunctionDeploymentStatus deployment_status = 7;
|
|
70
|
-
map<string, string> labels = 8;
|
|
71
|
-
int64 version = 9;
|
|
72
|
-
google.protobuf.Timestamp created_at = 10;
|
|
73
|
-
google.protobuf.Timestamp updated_at = 11;
|
|
74
|
-
string message = 12;
|
|
75
|
-
axern.control.common.v1.WorkloadDiagnosticCode diagnostic_code = 13;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
message FunctionRevision {
|
|
79
|
-
string id = 1;
|
|
80
|
-
string function_id = 2;
|
|
81
|
-
string namespace = 3;
|
|
82
|
-
string name = 4;
|
|
83
|
-
int64 revision_number = 5;
|
|
84
|
-
FunctionSpec spec = 6;
|
|
85
|
-
FunctionSource source = 7;
|
|
86
|
-
string source_digest = 8;
|
|
87
|
-
string manifest_digest = 9;
|
|
88
|
-
map<string, string> labels = 10;
|
|
89
|
-
google.protobuf.Timestamp created_at = 11;
|
|
90
|
-
string created_by = 12;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message FunctionDeployment {
|
|
94
|
-
string function_id = 1;
|
|
95
|
-
string active_revision_id = 2;
|
|
96
|
-
FunctionDeploymentStatus status = 3;
|
|
97
|
-
FunctionScalingSpec scaling = 4;
|
|
98
|
-
int32 desired_replicas = 5;
|
|
99
|
-
int32 ready_replicas = 6;
|
|
100
|
-
int32 active_invocations = 7;
|
|
101
|
-
google.protobuf.Timestamp updated_at = 8;
|
|
102
|
-
string message = 9;
|
|
103
|
-
axern.control.common.v1.WorkloadDiagnosticCode diagnostic_code = 10;
|
|
104
|
-
string worker_service_id = 11;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
message FunctionInvocation {
|
|
108
|
-
string id = 1;
|
|
109
|
-
string function_id = 2;
|
|
110
|
-
string function_name = 3;
|
|
111
|
-
string namespace = 4;
|
|
112
|
-
string revision_id = 5;
|
|
113
|
-
FunctionInvocationStatus status = 6;
|
|
114
|
-
FunctionInvocationMode mode = 7;
|
|
115
|
-
FunctionPayload payload = 8;
|
|
116
|
-
FunctionResult result = 9;
|
|
117
|
-
FunctionError error = 10;
|
|
118
|
-
google.protobuf.Duration timeout = 11;
|
|
119
|
-
google.protobuf.Duration duration = 12;
|
|
120
|
-
string request_id = 13;
|
|
121
|
-
map<string, string> labels = 14;
|
|
122
|
-
google.protobuf.Timestamp created_at = 15;
|
|
123
|
-
google.protobuf.Timestamp started_at = 16;
|
|
124
|
-
google.protobuf.Timestamp completed_at = 17;
|
|
125
|
-
string message = 18;
|
|
126
|
-
axern.control.common.v1.WorkloadDiagnosticCode diagnostic_code = 19;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
message FunctionEvent {
|
|
130
|
-
string id = 1;
|
|
131
|
-
string function_id = 2;
|
|
132
|
-
string invocation_id = 3;
|
|
133
|
-
string revision_id = 4;
|
|
134
|
-
FunctionEventType type = 5;
|
|
135
|
-
string message = 6;
|
|
136
|
-
map<string, string> details = 7;
|
|
137
|
-
google.protobuf.Timestamp created_at = 8;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
message FunctionSpec {
|
|
141
|
-
string runtime = 1;
|
|
142
|
-
string handler = 2;
|
|
143
|
-
string initializer = 3;
|
|
144
|
-
FunctionSourceSpec source = 4;
|
|
145
|
-
google.protobuf.Duration timeout = 5;
|
|
146
|
-
axern.control.common.v1.ExecutionConfig config = 6;
|
|
147
|
-
FunctionScalingSpec scaling = 7;
|
|
148
|
-
FunctionRetentionPolicy retention = 8;
|
|
149
|
-
FunctionWorkerSource worker_source = 9;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
message FunctionWorkerSource {
|
|
153
|
-
oneof source {
|
|
154
|
-
string environment_id = 1;
|
|
155
|
-
axern.control.environment.v1.EnvironmentSpec environment = 2;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
message FunctionSourceSpec {
|
|
160
|
-
oneof source {
|
|
161
|
-
FunctionBundleSource bundle = 1;
|
|
162
|
-
FunctionImageSource image = 2;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
message FunctionSource {
|
|
167
|
-
oneof source {
|
|
168
|
-
FunctionBundleSource bundle = 1;
|
|
169
|
-
FunctionImageSource image = 2;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
message FunctionBundleSource {
|
|
174
|
-
string digest = 1;
|
|
175
|
-
string media_type = 2;
|
|
176
|
-
int64 size_bytes = 3;
|
|
177
|
-
string storage_uri = 4;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
message FunctionImageSource {
|
|
181
|
-
string ref = 1;
|
|
182
|
-
string digest = 2;
|
|
183
|
-
string registry_credential_id = 3;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
message FunctionScalingSpec {
|
|
187
|
-
int32 min_replicas = 1;
|
|
188
|
-
int32 max_replicas = 2;
|
|
189
|
-
int32 concurrency = 3;
|
|
190
|
-
google.protobuf.Duration idle_timeout = 4;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
message FunctionRetentionPolicy {
|
|
194
|
-
google.protobuf.Duration invocation_retention = 1;
|
|
195
|
-
int32 max_invocations = 2;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
message FunctionPayload {
|
|
199
|
-
string content_type = 1;
|
|
200
|
-
bytes data = 2;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
message FunctionResult {
|
|
204
|
-
string content_type = 1;
|
|
205
|
-
bytes data = 2;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
message FunctionError {
|
|
209
|
-
string code = 1;
|
|
210
|
-
string message = 2;
|
|
211
|
-
string type = 3;
|
|
212
|
-
string stack_trace = 4;
|
|
213
|
-
map<string, string> details = 5;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
message FunctionListFilter {
|
|
217
|
-
string namespace = 1;
|
|
218
|
-
repeated FunctionStatus statuses = 2;
|
|
219
|
-
map<string, string> labels = 3;
|
|
220
|
-
string cursor = 4;
|
|
221
|
-
int32 page_size = 5;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
message FunctionInvocationListFilter {
|
|
225
|
-
string namespace = 1;
|
|
226
|
-
string function_id = 2;
|
|
227
|
-
string function_name = 3;
|
|
228
|
-
string revision_id = 4;
|
|
229
|
-
repeated FunctionInvocationStatus statuses = 5;
|
|
230
|
-
map<string, string> labels = 6;
|
|
231
|
-
string cursor = 7;
|
|
232
|
-
int32 page_size = 8;
|
|
233
|
-
}
|