chore: move proto to sdk conversion to agentsdk (#11831)

`agentsdk` depends on `agent/proto` because it needs to get the version to dial.

Therefore, the conversion routines need to live in `agentsdk` so that we can convert to and from the Manifest.

I briefly considered refactoring the agent to only reference `proto.Manifest`, but decided against it because we might have multiple protocol versions in the future, its useful to have a protocol-independent data structure.
This commit is contained in:
Spike Curtis
2024-01-30 09:04:56 +04:00
committed by GitHub
parent 1e8a9c09fe
commit 0eff646c31
8 changed files with 423 additions and 174 deletions
+1 -1
View File
@@ -277,7 +277,7 @@ func (f *FakeAgentAPI) GetServiceBanner(context.Context, *agentproto.GetServiceB
if err != nil {
return nil, err
}
return agentproto.ServiceBannerFromSDK(sb), nil
return agentsdk.ProtoFromServiceBanner(sb), nil
}
func (*FakeAgentAPI) UpdateStats(context.Context, *agentproto.UpdateStatsRequest) (*agentproto.UpdateStatsResponse, error) {