Skip to content

Commit

Permalink
make subscribe response simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
nullfunc committed Jul 2, 2024
1 parent 9bf2961 commit 007c546
Show file tree
Hide file tree
Showing 3 changed files with 282 additions and 242 deletions.
16 changes: 9 additions & 7 deletions src/pkg/cli/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ func Subscribe(ctx context.Context, client client.Client, services []string) (<-
continue
}

servInfo := msg.GetService()
if servInfo == nil || servInfo.Service == nil {
continue
status := SubscribeServiceStatus{
Name: msg.Name,
Status: msg.Status,
State: msg.State,
}

status := SubscribeServiceStatus{
Name: servInfo.Service.Name,
Status: servInfo.Status,
State: servInfo.State,
servInfo := msg.GetService()
if servInfo == nil || servInfo.Service == nil {
status.Name = servInfo.Service.Name
status.Status = servInfo.Status
status.State = servInfo.State
}

statusChan <- status
Expand Down
Loading

0 comments on commit 007c546

Please sign in to comment.