refactor: hide dokku scale file parsing inside ps plugin
This commit is contained in:
@@ -24,6 +24,25 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
type FormationSlice []*Formation
|
||||
|
||||
type Formation struct {
|
||||
ProcessType string `json:"process_type"`
|
||||
Quantity int `json:"quantity"`
|
||||
}
|
||||
|
||||
func (d FormationSlice) Len() int {
|
||||
return len(d)
|
||||
}
|
||||
|
||||
func (d FormationSlice) Swap(i, j int) {
|
||||
d[i], d[j] = d[j], d[i]
|
||||
}
|
||||
|
||||
func (d FormationSlice) Less(i, j int) bool {
|
||||
return d[i].ProcessType < d[j].ProcessType
|
||||
}
|
||||
|
||||
// Rebuild rebuilds app from base image
|
||||
func Rebuild(appName string) error {
|
||||
return common.PlugnTrigger("receive-app", []string{appName}...)
|
||||
|
||||
Reference in New Issue
Block a user