refactor: defer close connection or file

This commit is contained in:
2026-05-05 14:34:00 +03:00
parent ea5cca09f5
commit 7a53c1dc9f
19 changed files with 859 additions and 52 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
package domain
type RegisterAgentRequest struct {
AgentId string
AgentID string
AgentName string
AgentVersion string
Host HostInfo
+2 -2
View File
@@ -10,7 +10,7 @@ func ToDomainAgentRequest(request *pb.RegisterAgentRequest) RegisterAgentRequest
}
return RegisterAgentRequest{
AgentId: request.AgentId,
AgentID: request.AgentId,
AgentName: request.AgentName,
Host: HostInfo{
System: request.Host.System,
@@ -53,7 +53,7 @@ func ToDomainCapabilities(capability []*pb.Capability) []Capability {
func ToGRPCAgentRequest(request RegisterAgentRequest) pb.RegisterAgentRequest {
return pb.RegisterAgentRequest{
AgentId: request.AgentId,
AgentId: request.AgentID,
AgentName: request.AgentName,
Host: &pb.HostInfo{
Hostname: request.Host.Hostname,