forked from cloudfoundry-attic/app-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update app-manager to match AZ balance work in auction
- Loading branch information
1 parent
b3654af
commit 4ff9629
Showing
8 changed files
with
73 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package stop_message_builder | ||
|
||
import "github.com/cloudfoundry-incubator/runtime-schema/models" | ||
|
||
type StopMessageBuilder struct { | ||
numAZs int | ||
} | ||
|
||
func New(numAZs int) *StopMessageBuilder { | ||
return &StopMessageBuilder{ | ||
numAZs: numAZs, | ||
} | ||
} | ||
|
||
func (b *StopMessageBuilder) Build(desiredLRP models.DesiredLRP, indexToStopAllButOne int) models.LRPStopAuction { | ||
return models.LRPStopAuction{ | ||
ProcessGuid: desiredLRP.ProcessGuid, | ||
Index: indexToStopAllButOne, | ||
NumInstances: desiredLRP.Instances, | ||
NumAZs: b.numAZs, | ||
} | ||
} |