Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
GET /v1/processes/deployment/{deploymentId}/grouped/container
GetGroupedProcessByDeploymentAndContainer 返回按部署和容器分组的所有执行的进程。
| 代码 (Code) | 消息 (Message) | 数据类型 (Datatype) |
|---|---|---|
200 |
成功的响应。(A successful response.) |
|
0 |
意外的错误响应。(An unexpected error response.) |
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
code |
整数 (Integer) |
int32 |
|||
message |
字符串 (String) |
||||
details |
ProtobufAny 列表 (ProtobufAny List) |
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
parentUid |
长整型 (Long) |
int64 |
|||
parentExecFilePath |
字符串 (String) |
Any 包含任意序列化的协议缓冲区消息以及描述序列化消息类型的 URL。
Protobuf 库提供实用函数或 Any 类型的额外生成方法来支持打包/解包 Any 值。
示例 1:在 C++ 中打包和解包消息。
Foo foo = ...;
Any any;
any.PackFrom(foo);
...
if (any.UnpackTo(&foo)) {
...
}
示例 2:在 Java 中打包和解包消息。
Foo foo = ...;
Any any = Any.pack(foo);
...
if (any.is(Foo.class)) {
foo = any.unpack(Foo.class);
}
// or ...
if (any.isSameTypeAs(Foo.getDefaultInstance())) {
foo = any.unpack(Foo.getDefaultInstance());
}
Example 3: Pack and unpack a message in Python.
foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
if err != nil {
...
}
...
foo := &pb.Foo{}
if err := any.UnmarshalTo(foo); err != nil {
...
}
Protobuf 库提供的打包方法默认使用 'type.googleapis.com/full.type.name' 作为类型 URL,解包方法只使用类型 URL 中最后一个 '/' 后的全限定类型名称,例如 "foo.bar.com/x/y.z" 将产生类型名称 "y.z"。
Any 值的 JSON 表示使用反序列化的嵌入式消息的常规表示,并添加一个包含类型 URL 的额外字段 @type。示例
package google.profile;
message Person {
string first_name = 1;
string last_name = 2;
}
{
"@type": "type.googleapis.com/google.profile.Person",
"firstName": <string>,
"lastName": <string>
}
如果嵌入式消息类型是众所周知的并且具有自定义 JSON 表示,则该表示将被嵌入,添加一个包含自定义 JSON 的字段 value 以及 @type 字段。示例(对于消息 [google.protobuf.Duration][])
{
"@type": "type.googleapis.com/google.protobuf.Duration",
"value": "1.212s"
}
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
@type |
字符串 (String) |
唯一标识序列化协议缓冲区消息类型的 URL/资源名称。此字符串必须包含至少一个“/”字符。URL 路径的最后一个段必须表示类型的全限定名称(如 |
Next available tag: 13
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
id |
字符串 (String) |
||||
deploymentId |
字符串 (String) |
||||
containerName |
字符串 (String) |
||||
podId |
字符串 (String) |
||||
podUid |
字符串 (String) |
||||
signal |
|||||
clusterId |
字符串 (String) |
||||
namespace |
字符串 (String) |
||||
containerStartTime |
日期 |
日期时间 |
|||
imageId |
字符串 (String) |
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
id |
字符串 (String) |
用于标识消息的唯一 UUID。我们将其放在此处而不是顶级位置,因为我们希望每条消息都是自包含的。 |
|||
containerId |
字符串 (String) |
||||
时间 |
日期 |
日期时间 |
|||
名称 |
字符串 (String) |
||||
参数 |
字符串 (String) |
||||
execFilePath |
字符串 (String) |
||||
pid |
长整型 (Long) |
int64 |
|||
uid |
长整型 (Long) |
int64 |
|||
gid |
长整型 (Long) |
int64 |
|||
血缘关系 |
|
||||
已抓取 |
布尔值 |
||||
血缘信息 |
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
组 |
| 字段名称 (Field Name) | 必填 (Required) | 可空 (Nullable) | 类型 (Type) | 描述 (Description) | 格式 (Format) |
|---|---|---|---|---|---|
参数 |
字符串 (String) |
||||
信号 |