mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
add Mode to Service entity
This commit is contained in:
1 parent
8db7ac84a0
commit
5621a84e99
6 files changed
+66
-42
No files matched your search
@@ -703,6 +703,8 @@ func (m *Machine) InspectService(
|
||||
if len(records) == 0 {
|
||||
return nil, status.Error(codes.NotFound, "service not found")
|
||||
}
|
||||
// TODO: handle multiple services with the same name but different IDs. This can happen when two services
|
||||
// with the same name are created concurrently on different machines.
|
||||
|
||||
containers := make([]*pb.Service_Container, len(records))
|
||||
for i, r := range records {
|
||||
@@ -719,6 +721,7 @@ func (m *Machine) InspectService(
|
||||
svc := &pb.Service{
|
||||
Id: records[0].Container.ServiceID(),
|
||||
Name: records[0].Container.ServiceName(),
|
||||
Mode: records[0].Container.ServiceMode(),
|
||||
Containers: containers,
|
||||
}
|
||||
return &pb.InspectServiceResponse{Service: svc}, nil
|
||||
|
||||
Reference in new issue
Block a user