@cofy-x/axern-sdk 0.6.2 → 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 +26 -65
- package/dist/client/index.d.ts +10 -11
- package/dist/client/index.js +64 -68
- 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 +4 -5
- package/dist/index.js +1 -2
- 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 +34 -94
- package/dist/proto/axern/control/common/v1/common.proto +29 -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 +3 -9
- package/dist/sandbox/index.js +13 -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
package/dist/sandbox/index.js
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
import { SandboxStateError } from "../errors/index.js";
|
|
7
7
|
import { startTunnelRuntime, tunnelMetadata } from "../tunnel/runtime.js";
|
|
8
8
|
import { directoryArchiveChunks, extractDirectoryArchive } from "./archive.js";
|
|
9
|
-
import { defaultSandboxArgv, sandboxLabels, sandboxMetadata, validateSandboxOptions,
|
|
9
|
+
import { defaultSandboxArgv, sandboxLabels, sandboxMetadata, validateSandboxOptions, waitRunningRun } from "./lifecycle.js";
|
|
10
10
|
export class Sandbox {
|
|
11
11
|
client;
|
|
12
12
|
options;
|
|
13
13
|
createdEnvironment = false;
|
|
14
14
|
environmentId = "";
|
|
15
|
-
|
|
15
|
+
runId = "";
|
|
16
16
|
currentState;
|
|
17
17
|
currentMetadata;
|
|
18
18
|
tunnelRuntime;
|
|
@@ -52,16 +52,14 @@ export class Sandbox {
|
|
|
52
52
|
this.environmentId = environmentId;
|
|
53
53
|
this.createdEnvironment = true;
|
|
54
54
|
}
|
|
55
|
-
const
|
|
55
|
+
const run = await this.client.createRun({
|
|
56
56
|
namespace: this.options.namespace,
|
|
57
57
|
environmentId,
|
|
58
58
|
argv: this.options.argv ?? defaultSandboxArgv,
|
|
59
59
|
env: this.options.env,
|
|
60
60
|
cwd: this.options.cwd,
|
|
61
|
-
runtimeClass: this.options.runtimeClass,
|
|
62
61
|
networkPolicy: this.options.networkPolicy,
|
|
63
62
|
extensionCapabilities: this.options.extensionCapabilities,
|
|
64
|
-
volumes: this.options.volumes,
|
|
65
63
|
requestCpu: this.options.requestCpu,
|
|
66
64
|
requestMemory: this.options.requestMemory,
|
|
67
65
|
requestEphemeralStorage: this.options.requestEphemeralStorage,
|
|
@@ -70,14 +68,13 @@ export class Sandbox {
|
|
|
70
68
|
limitEphemeralStorage: this.options.limitEphemeralStorage,
|
|
71
69
|
labels: sandboxLabels(this.options.labels),
|
|
72
70
|
});
|
|
73
|
-
this.
|
|
74
|
-
const
|
|
71
|
+
this.runId = String(run.id ?? "");
|
|
72
|
+
const runningRun = await waitRunningRun(this.runId, this.options.readyTimeoutMs ?? 180_000, (runId, signal) => this.client.watchRun(runId, { signal }));
|
|
75
73
|
this.currentState = {
|
|
76
74
|
environmentId,
|
|
77
|
-
|
|
78
|
-
allocationId: String(
|
|
79
|
-
nodeId: String(
|
|
80
|
-
attempt: Number(replica.attempt ?? 0),
|
|
75
|
+
runId: this.runId,
|
|
76
|
+
allocationId: String(runningRun.allocation_id ?? ""),
|
|
77
|
+
nodeId: String(runningRun.node_id ?? ""),
|
|
81
78
|
startedAt: new Date(),
|
|
82
79
|
};
|
|
83
80
|
this.currentMetadata = sandboxMetadata(this.options, this.currentState);
|
|
@@ -101,17 +98,17 @@ export class Sandbox {
|
|
|
101
98
|
}
|
|
102
99
|
}
|
|
103
100
|
async close() {
|
|
104
|
-
const
|
|
101
|
+
const runId = this.runId;
|
|
105
102
|
const tunnelRuntime = this.tunnelRuntime;
|
|
106
|
-
this.
|
|
103
|
+
this.runId = "";
|
|
107
104
|
this.tunnelRuntime = undefined;
|
|
108
105
|
this.currentState = undefined;
|
|
109
106
|
this.currentMetadata = undefined;
|
|
110
107
|
if (tunnelRuntime !== undefined) {
|
|
111
108
|
await tunnelRuntime.stop().catch(() => undefined);
|
|
112
109
|
}
|
|
113
|
-
if (
|
|
114
|
-
await this.client.
|
|
110
|
+
if (runId !== "") {
|
|
111
|
+
await this.client.cancelRun(runId).catch(() => undefined);
|
|
115
112
|
}
|
|
116
113
|
if (this.createdEnvironment && this.environmentId !== "") {
|
|
117
114
|
const environmentId = this.environmentId;
|
|
@@ -126,12 +123,6 @@ export class Sandbox {
|
|
|
126
123
|
async process(command, options = {}) {
|
|
127
124
|
return this.nodeClient().process(command, options);
|
|
128
125
|
}
|
|
129
|
-
async execImage(image, command, options = {}) {
|
|
130
|
-
return this.nodeClient().execImage(image, command, options);
|
|
131
|
-
}
|
|
132
|
-
async processImage(image, command, options = {}) {
|
|
133
|
-
return this.nodeClient().processImage(image, command, options);
|
|
134
|
-
}
|
|
135
126
|
async capabilityStatus(options = {}) {
|
|
136
127
|
return this.nodeClient().capabilityStatus(options);
|
|
137
128
|
}
|
|
@@ -203,6 +194,6 @@ export class Sandbox {
|
|
|
203
194
|
if (this.currentState === undefined) {
|
|
204
195
|
throw new SandboxStateError("sandbox is not started");
|
|
205
196
|
}
|
|
206
|
-
return this.client.
|
|
197
|
+
return this.client.allocation(this.currentState.allocationId);
|
|
207
198
|
}
|
|
208
199
|
}
|
|
@@ -8,4 +8,4 @@ export declare const defaultSandboxArgv: string[];
|
|
|
8
8
|
export declare function validateSandboxOptions(options: SandboxOptions): void;
|
|
9
9
|
export declare function sandboxLabels(labels: Record<string, string> | undefined): Record<string, string>;
|
|
10
10
|
export declare function sandboxMetadata(options: SandboxOptions, state: SandboxState): SandboxMetadata;
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function waitRunningRun(runId: string, timeoutMs: number, watchRun: (runId: string, signal: AbortSignal) => AsyncIterable<Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { SandboxTimeoutError, SandboxValidationError } from "../errors/index.js";
|
|
7
7
|
export const defaultSandboxArgv = ["/bin/sh", "-lc", "sleep infinity"];
|
|
8
|
+
const runStatus = {
|
|
9
|
+
running: 3,
|
|
10
|
+
succeeded: 4,
|
|
11
|
+
failed: 5,
|
|
12
|
+
cancelled: 6,
|
|
13
|
+
};
|
|
8
14
|
export function validateSandboxOptions(options) {
|
|
9
15
|
const sourceCount = [options.templateId, options.image, options.environmentId].filter((source) => source !== undefined && source !== "").length;
|
|
10
16
|
if (sourceCount !== 1) {
|
|
@@ -21,27 +27,62 @@ export function sandboxMetadata(options, state) {
|
|
|
21
27
|
return {
|
|
22
28
|
...state,
|
|
23
29
|
namespace: options.namespace ?? "default",
|
|
24
|
-
runtimeClass: options.runtimeClass ?? "",
|
|
25
30
|
labels: sandboxLabels(options.labels),
|
|
26
31
|
source: sandboxSource(options),
|
|
27
32
|
};
|
|
28
33
|
}
|
|
29
|
-
export async function
|
|
34
|
+
export async function waitRunningRun(runId, timeoutMs, watchRun) {
|
|
30
35
|
const deadline = Date.now() + timeoutMs;
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
let lastRun;
|
|
37
|
+
const controller = new AbortController();
|
|
38
|
+
const iterator = watchRun(runId, controller.signal)[Symbol.asyncIterator]();
|
|
39
|
+
try {
|
|
40
|
+
for (;;) {
|
|
41
|
+
const remainingMs = deadline - Date.now();
|
|
42
|
+
if (remainingMs <= 0)
|
|
43
|
+
break;
|
|
44
|
+
const result = await nextBeforeDeadline(iterator, remainingMs);
|
|
45
|
+
if (result === undefined || result.done)
|
|
46
|
+
break;
|
|
47
|
+
const run = result.value;
|
|
48
|
+
lastRun = run;
|
|
49
|
+
const status = Number(run.status ?? 0);
|
|
50
|
+
if (status === runStatus.running && String(run.allocation_id ?? "") !== "") {
|
|
51
|
+
return run;
|
|
52
|
+
}
|
|
53
|
+
if (status === runStatus.succeeded || status === runStatus.failed || status === runStatus.cancelled) {
|
|
54
|
+
throw new Error(`run ${runId} became ${String(run.status ?? "")} before its sandbox allocation was running: ${String(run.message ?? "")}`);
|
|
55
|
+
}
|
|
40
56
|
}
|
|
41
|
-
await sleep(2_000);
|
|
42
57
|
}
|
|
43
|
-
|
|
44
|
-
|
|
58
|
+
finally {
|
|
59
|
+
controller.abort();
|
|
60
|
+
try {
|
|
61
|
+
const close = iterator.return?.();
|
|
62
|
+
if (close !== undefined)
|
|
63
|
+
void close.catch(() => undefined);
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// The readiness result owns the error surface; stream cleanup is best effort.
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const details = lastRun === undefined ? "no state observed" : `${String(lastRun.status ?? "")}: ${String(lastRun.message ?? "")}`;
|
|
70
|
+
throw new SandboxTimeoutError(`run ${runId} did not reach a running sandbox allocation: ${details}`);
|
|
71
|
+
}
|
|
72
|
+
async function nextBeforeDeadline(iterator, timeoutMs) {
|
|
73
|
+
let timer;
|
|
74
|
+
try {
|
|
75
|
+
return await Promise.race([
|
|
76
|
+
iterator.next(),
|
|
77
|
+
new Promise((resolve) => {
|
|
78
|
+
timer = setTimeout(resolve, timeoutMs);
|
|
79
|
+
}),
|
|
80
|
+
]);
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
if (timer !== undefined)
|
|
84
|
+
clearTimeout(timer);
|
|
85
|
+
}
|
|
45
86
|
}
|
|
46
87
|
function sandboxSource(options) {
|
|
47
88
|
if (options.templateId !== undefined && options.templateId !== "") {
|
|
@@ -52,6 +93,3 @@ function sandboxSource(options) {
|
|
|
52
93
|
}
|
|
53
94
|
return "environment";
|
|
54
95
|
}
|
|
55
|
-
function sleep(ms) {
|
|
56
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
57
|
-
}
|
package/dist/tunnel/connector.js
CHANGED
|
@@ -26,7 +26,7 @@ export class TunnelConnector {
|
|
|
26
26
|
this.config = config;
|
|
27
27
|
}
|
|
28
28
|
async start() {
|
|
29
|
-
const target = this.config.session.client_edge_target
|
|
29
|
+
const target = this.config.session.client_edge_target;
|
|
30
30
|
if (target === undefined || target === "") {
|
|
31
31
|
throw new Error(`tunnel session ${this.config.session.session_id ?? ""} has no relay target`);
|
|
32
32
|
}
|
package/dist/tunnel/control.d.ts
CHANGED
package/dist/tunnel/control.js
CHANGED
|
@@ -16,7 +16,6 @@ export class TunnelControlClient {
|
|
|
16
16
|
const response = await unary(this.client, "CreateTunnelSession", {
|
|
17
17
|
allocation_id: required("allocationId", options.allocationId),
|
|
18
18
|
remote_port: options.proxyPort,
|
|
19
|
-
local_target: required("upstream", options.upstream),
|
|
20
19
|
ttl: duration(options.ttlSeconds * 1000),
|
|
21
20
|
wait_ready: true,
|
|
22
21
|
ready_timeout: duration(options.readyTimeoutMs),
|
package/dist/tunnel/runtime.d.ts
CHANGED
package/dist/tunnel/runtime.js
CHANGED
|
@@ -15,7 +15,6 @@ export async function startTunnelRuntime(options) {
|
|
|
15
15
|
const proxyPort = options.tunnel.proxyPort ?? defaultProxyPort;
|
|
16
16
|
const result = await options.control.createSession({
|
|
17
17
|
allocationId: options.allocationId,
|
|
18
|
-
upstream: options.tunnel.upstream,
|
|
19
18
|
proxyPort,
|
|
20
19
|
ttlSeconds,
|
|
21
20
|
readyTimeoutMs: options.tunnel.readyTimeoutMs ?? defaultReadyTimeoutMs,
|
package/dist/tunnel/types.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -24,22 +24,6 @@ export interface ExecResult {
|
|
|
24
24
|
stdoutText(encoding?: BufferEncoding): string;
|
|
25
25
|
stderrText(encoding?: BufferEncoding): string;
|
|
26
26
|
}
|
|
27
|
-
export interface ImageProcessMount {
|
|
28
|
-
sandboxPath: string;
|
|
29
|
-
targetPath: string;
|
|
30
|
-
readonly?: boolean;
|
|
31
|
-
options?: readonly string[];
|
|
32
|
-
}
|
|
33
|
-
export interface VolumeMount {
|
|
34
|
-
name: string;
|
|
35
|
-
target: string;
|
|
36
|
-
readonly?: boolean;
|
|
37
|
-
options?: readonly string[];
|
|
38
|
-
}
|
|
39
|
-
export declare function workspaceMount(path?: string): ImageProcessMount;
|
|
40
|
-
export interface ImageExecOptions extends ExecOptions {
|
|
41
|
-
mounts?: readonly ImageProcessMount[];
|
|
42
|
-
}
|
|
43
27
|
export type ProcessEvent = {
|
|
44
28
|
kind: "ready";
|
|
45
29
|
} | {
|
|
@@ -54,9 +38,8 @@ export type ProcessEvent = {
|
|
|
54
38
|
message: string;
|
|
55
39
|
};
|
|
56
40
|
export interface ProcessOptions extends Omit<ExecOptions, "check"> {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
mounts?: readonly ImageProcessMount[];
|
|
41
|
+
initialCols?: number;
|
|
42
|
+
initialRows?: number;
|
|
60
43
|
}
|
|
61
44
|
export interface ProcessResult {
|
|
62
45
|
exitCode: number;
|
|
@@ -134,7 +117,7 @@ export interface TunnelMetadata {
|
|
|
134
117
|
upstream: string;
|
|
135
118
|
proxyPort: number;
|
|
136
119
|
}
|
|
137
|
-
export interface
|
|
120
|
+
export interface CapabilityProviderDependencyStatus {
|
|
138
121
|
name: string;
|
|
139
122
|
available: boolean;
|
|
140
123
|
reason: string;
|
|
@@ -146,7 +129,7 @@ export interface CapabilityProviderStatus {
|
|
|
146
129
|
capabilities: string[];
|
|
147
130
|
backend: string;
|
|
148
131
|
reason: string;
|
|
149
|
-
dependencies:
|
|
132
|
+
dependencies: CapabilityProviderDependencyStatus[];
|
|
150
133
|
}
|
|
151
134
|
export interface CapabilityProviderSummary {
|
|
152
135
|
total: number;
|
package/dist/types.js
CHANGED
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.admin.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/admin/v1;adminv1";
|
|
6
|
-
|
|
7
|
-
import "google/protobuf/timestamp.proto";
|
|
8
|
-
|
|
9
|
-
enum AllocationLifecycleRetryOwnerType {
|
|
10
|
-
ALLOCATION_LIFECYCLE_RETRY_OWNER_TYPE_UNSPECIFIED = 0;
|
|
11
|
-
ALLOCATION_LIFECYCLE_RETRY_OWNER_TYPE_RUN = 1;
|
|
12
|
-
ALLOCATION_LIFECYCLE_RETRY_OWNER_TYPE_SERVICE = 2;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
enum AllocationLifecycleRetryReason {
|
|
16
|
-
ALLOCATION_LIFECYCLE_RETRY_REASON_UNSPECIFIED = 0;
|
|
17
|
-
ALLOCATION_LIFECYCLE_RETRY_REASON_CREATE = 1;
|
|
18
|
-
ALLOCATION_LIFECYCLE_RETRY_REASON_DELETE = 2;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
message AllocationLifecycleRetry {
|
|
22
|
-
string allocation_id = 1;
|
|
23
|
-
string owner_id = 2;
|
|
24
|
-
AllocationLifecycleRetryOwnerType owner_type = 3;
|
|
25
|
-
string environment_id = 4;
|
|
26
|
-
AllocationLifecycleRetryReason reason = 5;
|
|
27
|
-
string node_id = 6;
|
|
28
|
-
string node_target = 7;
|
|
29
|
-
int64 attempt = 8;
|
|
30
|
-
int32 reconcile_attempts = 9;
|
|
31
|
-
string last_error = 10;
|
|
32
|
-
google.protobuf.Timestamp next_run_at = 11;
|
|
33
|
-
google.protobuf.Timestamp created_at = 12;
|
|
34
|
-
google.protobuf.Timestamp updated_at = 13;
|
|
35
|
-
int64 age_seconds = 14;
|
|
36
|
-
bool due = 15;
|
|
37
|
-
bool clearable = 16;
|
|
38
|
-
string clear_blocked_reason = 17;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
message AllocationLifecycleRetryFilter {
|
|
42
|
-
AllocationLifecycleRetryOwnerType owner_type = 1;
|
|
43
|
-
AllocationLifecycleRetryReason reason = 2;
|
|
44
|
-
bool due_only = 3;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message ListAllocationLifecycleRetriesRequest {
|
|
48
|
-
AllocationLifecycleRetryFilter filter = 1;
|
|
49
|
-
int32 limit = 2;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
message ListAllocationLifecycleRetriesResponse {
|
|
53
|
-
repeated AllocationLifecycleRetry retries = 1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
message ForceAllocationLifecycleRetryRequest {
|
|
57
|
-
string allocation_id = 1;
|
|
58
|
-
AllocationLifecycleRetryReason reason = 2;
|
|
59
|
-
string operator_reason = 3;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
message ForceAllocationLifecycleRetryResponse {
|
|
63
|
-
AllocationLifecycleRetry retry = 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
message FailAllocationLifecycleRetryRequest {
|
|
67
|
-
string allocation_id = 1;
|
|
68
|
-
AllocationLifecycleRetryReason reason = 2;
|
|
69
|
-
string operator_reason = 3;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
message FailAllocationLifecycleRetryResponse {
|
|
73
|
-
AllocationLifecycleRetry failed_retry = 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message ClearAllocationLifecycleRetryRequest {
|
|
77
|
-
string allocation_id = 1;
|
|
78
|
-
AllocationLifecycleRetryReason reason = 2;
|
|
79
|
-
string operator_reason = 3;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
message ClearAllocationLifecycleRetryResponse {
|
|
83
|
-
AllocationLifecycleRetry cleared_retry = 1;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
service AllocationLifecycleAdmin {
|
|
87
|
-
rpc ListAllocationLifecycleRetries(ListAllocationLifecycleRetriesRequest) returns (ListAllocationLifecycleRetriesResponse) {}
|
|
88
|
-
rpc ForceAllocationLifecycleRetry(ForceAllocationLifecycleRetryRequest) returns (ForceAllocationLifecycleRetryResponse) {}
|
|
89
|
-
rpc FailAllocationLifecycleRetry(FailAllocationLifecycleRetryRequest) returns (FailAllocationLifecycleRetryResponse) {}
|
|
90
|
-
rpc ClearAllocationLifecycleRetry(ClearAllocationLifecycleRetryRequest) returns (ClearAllocationLifecycleRetryResponse) {}
|
|
91
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.admin.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/admin/v1;adminv1";
|
|
6
|
-
|
|
7
|
-
message PurgeServiceRequest {
|
|
8
|
-
string service_id = 1;
|
|
9
|
-
string operator_reason = 2;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
message PurgeServiceResponse {
|
|
13
|
-
string service_id = 1;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
service ServiceAdmin {
|
|
17
|
-
rpc PurgeService(PurgeServiceRequest) returns (PurgeServiceResponse) {}
|
|
18
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package axern.control.admin.v1;
|
|
4
|
-
|
|
5
|
-
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/admin/v1;adminv1";
|
|
6
|
-
|
|
7
|
-
import "axern/control/storage/v1/storage_types.proto";
|
|
8
|
-
import "google/protobuf/timestamp.proto";
|
|
9
|
-
|
|
10
|
-
message StorageBinding {
|
|
11
|
-
string binding_id = 1;
|
|
12
|
-
string claim_id = 2;
|
|
13
|
-
string namespace = 3;
|
|
14
|
-
string claim_name = 4;
|
|
15
|
-
string workload_id = 5;
|
|
16
|
-
string workload_type = 6;
|
|
17
|
-
string allocation_id = 7;
|
|
18
|
-
string node_id = 8;
|
|
19
|
-
axern.control.storage.v1.VolumeStatus status = 9;
|
|
20
|
-
string message = 10;
|
|
21
|
-
google.protobuf.Timestamp created_at = 11;
|
|
22
|
-
google.protobuf.Timestamp updated_at = 12;
|
|
23
|
-
google.protobuf.Timestamp published_at = 13;
|
|
24
|
-
google.protobuf.Timestamp released_at = 14;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
message StorageBindingFilter {
|
|
28
|
-
repeated axern.control.storage.v1.VolumeStatus statuses = 1;
|
|
29
|
-
string namespace = 2;
|
|
30
|
-
string claim_name = 3;
|
|
31
|
-
string workload_id = 4;
|
|
32
|
-
string allocation_id = 5;
|
|
33
|
-
string node_id = 6;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
message ListStorageBindingsRequest {
|
|
37
|
-
StorageBindingFilter filter = 1;
|
|
38
|
-
int32 limit = 2;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
message ListStorageBindingsResponse {
|
|
42
|
-
repeated StorageBinding bindings = 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
message RetryStorageBindingRequest {
|
|
46
|
-
string binding_id = 1;
|
|
47
|
-
string operator_reason = 2;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
message RetryStorageBindingResponse {
|
|
51
|
-
StorageBinding binding = 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
message StorageReclaim {
|
|
55
|
-
string claim_id = 1;
|
|
56
|
-
string namespace = 2;
|
|
57
|
-
string claim_name = 3;
|
|
58
|
-
string service_id = 4;
|
|
59
|
-
string node_id = 5;
|
|
60
|
-
int64 attempt = 6;
|
|
61
|
-
google.protobuf.Timestamp next_retry_at = 7;
|
|
62
|
-
string last_error = 8;
|
|
63
|
-
google.protobuf.Timestamp updated_at = 9;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
message ListStorageReclaimsRequest {
|
|
67
|
-
string namespace = 1;
|
|
68
|
-
string service_id = 2;
|
|
69
|
-
string node_id = 3;
|
|
70
|
-
int32 limit = 4;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
message ListStorageReclaimsResponse {
|
|
74
|
-
repeated StorageReclaim reclaims = 1;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
service StorageAdmin {
|
|
78
|
-
rpc ListStorageBindings(ListStorageBindingsRequest) returns (ListStorageBindingsResponse) {}
|
|
79
|
-
rpc RetryStorageBinding(RetryStorageBindingRequest) returns (RetryStorageBindingResponse) {}
|
|
80
|
-
rpc ListStorageReclaims(ListStorageReclaimsRequest) returns (ListStorageReclaimsResponse) {}
|
|
81
|
-
}
|