Skip to content

Commit

Permalink
feat: add configer provider info report interface
Browse files Browse the repository at this point in the history
  • Loading branch information
bilosikia committed Nov 11, 2024
1 parent fd95ac6 commit b2f54fb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
6 changes: 5 additions & 1 deletion config_server/protocol/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ Client:这个版本的配置状态上报中修改了version的定义,-1仍

Server:这些信息是Agent状态的一部分,可选保存。与通过Event上报可观测信息不同的是,作为状态信息没有时间属性,用户可通过接口可获取即刻状态,而不需要选择时间窗口合并事件。

上报配置状态有两种途径:
1. 在全量心跳或者配置状态变化后的压缩心跳 request 中将配置最新状态带上。
2.【可选补充】通过 ReportConfigRequest 接口上报。适合对状态更新实时性要求比较高,或对心跳服务、配置服务、状态服务拆分以减少故障半径的实现。

### 预定义命令

Client: 通过request的flag传递,定义了FullStatus,表明本条信息为全量状态
Expand All @@ -259,4 +263,4 @@ Client: 当HeartbeatResponse中的code为0时,Agent应该正常处理下发的
### 辅助信息
在command\_info, command\_detail, config\_info, config\_detail中,都预留了extra字段,可以用于传递一些额外的用户自定义的辅助信息。\

注意:extra字段仅作传递辅助信息使用,不会对管控行为造成任何影响。
注意:extra字段仅作传递辅助信息使用,不会对管控行为造成任何影响。
19 changes: 18 additions & 1 deletion config_server/protocol/v2/agentV2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ message HeartbeatResponse {
bytes opaque = 8; // Opaque data for extension
}

// optional api, see readme.
// API: /Agent/FetchPipelineConfig/
// API: /Agent/FetchInstanceConfig/
// Agent request to ConfigServer, pulling details of the config
Expand All @@ -166,8 +167,24 @@ message FetchConfigResponse {
repeated ConfigDetail config_details = 3; // config detail
}

// optional api, see readme.
// API: /Agent/ReportPipelineConfig/
// API: /Agent/ReportInstanceConfig/
// Agent request to ConfigServer, report status of the config
message ReportConfigRequest {
bytes request_id = 1;
bytes instance_id = 2; // Agent's unique identification
repeated ConfigInfo config_infos = 3; // Config status info
}

// ConfigServer response to Agent's request
message ReportConfigResponse {
bytes request_id = 1;
CommonResponse commonResponse = 2;
}

message CommonResponse
{
int32 status = 1;
bytes errorMessage = 2;
}
}

0 comments on commit b2f54fb

Please sign in to comment.