@@ -5,9 +5,10 @@ import (
55)
66
77const (
8- defaultStackTableFormat = "table {{.Name}}\t {{.Services}}"
8+ defaultStackTableFormat = "table {{.Name}}\t {{.Services}}\t {{.Orchestrator}} "
99
10- stackServicesHeader = "SERVICES"
10+ stackServicesHeader = "SERVICES"
11+ stackOrchestrastorHeader = "ORCHESTRATOR"
1112)
1213
1314// Stack contains deployed stack information.
@@ -16,6 +17,8 @@ type Stack struct {
1617 Name string
1718 // Services is the number of the services
1819 Services int
20+ // Orchestratort is the platform on which the stack is deployed
21+ Orchestrator string
1922}
2023
2124// NewStackFormat returns a format for use with a stack Context
@@ -48,8 +51,9 @@ type stackContext struct {
4851func newStackContext () * stackContext {
4952 stackCtx := stackContext {}
5053 stackCtx .header = map [string ]string {
51- "Name" : nameHeader ,
52- "Services" : stackServicesHeader ,
54+ "Name" : nameHeader ,
55+ "Services" : stackServicesHeader ,
56+ "Orchestrator" : stackOrchestrastorHeader ,
5357 }
5458 return & stackCtx
5559}
@@ -65,3 +69,7 @@ func (s *stackContext) Name() string {
6569func (s * stackContext ) Services () string {
6670 return strconv .Itoa (s .s .Services )
6771}
72+
73+ func (s * stackContext ) Orchestrator () string {
74+ return s .s .Orchestrator
75+ }
0 commit comments