-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Produce the container topology by way of the process topology.
- Loading branch information
Tom Wilkie
committed
Jun 16, 2015
1 parent
8051a71
commit 8b57567
Showing
9 changed files
with
172 additions
and
98 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,40 @@ | ||
package render | ||
|
||
import ( | ||
"github.com/weaveworks/scope/report" | ||
) | ||
|
||
// EndpointRenderer is a Renderer which produces a renderable endpoint graph. | ||
var EndpointRenderer = LeafMap{ | ||
Selector: report.SelectEndpoint, | ||
Mapper: MapEndpointIdentity, | ||
Pseudo: GenericPseudoNode, | ||
} | ||
|
||
// ProcessRenderer is a Renderer which produces a renderable process | ||
// graph by merging the endpoint graph and the process topology. | ||
var ProcessRenderer = MakeReduce( | ||
Map{ | ||
MapFunc: MapEndpoint2Process, | ||
Renderer: EndpointRenderer, | ||
}, | ||
LeafMap{ | ||
Selector: report.SelectProcess, | ||
Mapper: MapProcessIdentity, | ||
Pseudo: GenericPseudoNode, | ||
}, | ||
) | ||
|
||
// ContainerRenderer is a Renderer which produces a renderable container | ||
// graph by merging the process graph and the container topology. | ||
var ContainerRenderer = MakeReduce( | ||
Map{ | ||
MapFunc: MapProcess2Container, | ||
Renderer: ProcessRenderer, | ||
}, | ||
LeafMap{ | ||
Selector: report.SelectContainer, | ||
Mapper: MapContainerIdentity, | ||
Pseudo: GenericPseudoNode, | ||
}, | ||
) |
Oops, something went wrong.