Skip to content

Commit

Permalink
chore: add define in message bus (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Jun 12, 2024
1 parent 2d41560 commit 8d0082a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions common/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ var (
Description: utils.Ptr("progress of the app"),
Example: utils.Ptr("64"),
}

PropertyTypeCheckPortConflict = message_bus.PropertyType{
Name: "check_port_conflict",
Description: utils.Ptr("todo: the field should be remove in future. it is not need for most message"),
Example: utils.Ptr("true"),
}

PropertyTypeDryRun = message_bus.PropertyType{
Name: "dry_run",
Description: utils.Ptr("todo: the field should be remove in future. it is not need for most message"),
Example: utils.Ptr("false"),
}
)

// container properties
Expand Down Expand Up @@ -132,7 +144,11 @@ var (
Name: "app:install-progress",
PropertyTypeList: []message_bus.PropertyType{
PropertyTypeAppName,
PropertyTypeAppIcon,
PropertyTypeAppProgress,
PropertyTypeAppTitle,
PropertyTypeCheckPortConflict,
PropertyTypeDryRun,
},
}

Expand Down
4 changes: 2 additions & 2 deletions service/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ func pullImageProgress(ctx context.Context, out io.ReadCloser, notificationType
switch message.Status {
// pull a new layer
case string(Pull):
layerNum += 1
layerNum++
// pull a layer complete
case string(PullComplete):
completedLayerNum += 1
completedLayerNum++
}

// layer progress
Expand Down

0 comments on commit 8d0082a

Please sign in to comment.