@@ -10,18 +10,18 @@ import (
1010
1111// DeisCtlClient manages Deis components, configuration, and related tasks.
1212type DeisCtlClient interface {
13- Config () error
14- Install (targets []string ) error
15- Journal (targets []string ) error
16- List () error
17- RefreshUnits () error
18- Restart (targets []string ) error
19- Scale (targets []string ) error
20- Start (targets []string ) error
21- Status (targets []string ) error
22- Stop (targets []string ) error
23- Uninstall (targets []string ) error
24- Update () error
13+ Config (argv [] string ) error
14+ Install (argv []string ) error
15+ Journal (argv []string ) error
16+ List (argv [] string ) error
17+ RefreshUnits (argv [] string ) error
18+ Restart (argv []string ) error
19+ Scale (argv []string ) error
20+ Start (argv []string ) error
21+ Status (argv []string ) error
22+ Stop (argv []string ) error
23+ Uninstall (argv []string ) error
24+ Update (argv [] string ) error
2525}
2626
2727// Client uses a backend to implement the DeisCtlClient interface.
@@ -56,61 +56,63 @@ func NewClient(requestedBackend string) (*Client, error) {
5656// A configuration value is stored and retrieved from a key/value store (in this case, etcd)
5757// at /deis/<component>/<config>. Configuration values are typically used for component-level
5858// configuration, such as enabling TLS for the routers.
59- func (c * Client ) Config () error {
60- return cmd .Config ()
59+ func (c * Client ) Config (argv [] string ) error {
60+ return cmd .Config (argv )
6161}
6262
63- // Install loads components' definitions from local unit files.
64- func (c * Client ) Install (targets []string ) error {
65- return cmd .Install (c .Backend , targets )
63+ // Install loads the definitions of components from local unit files.
64+ // After Install, the components will be available to Start.
65+ func (c * Client ) Install (argv []string ) error {
66+ return cmd .Install (argv , c .Backend )
6667}
6768
6869// Journal prints log output for the specified components.
69- func (c * Client ) Journal (targets []string ) error {
70- return cmd .Journal (c .Backend , targets )
70+ func (c * Client ) Journal (argv []string ) error {
71+ return cmd .Journal (argv , c .Backend )
7172}
7273
7374// List prints a summary of installed components.
74- func (c * Client ) List () error {
75- return cmd .ListUnits (c .Backend )
75+ func (c * Client ) List (argv [] string ) error {
76+ return cmd .ListUnits (argv , c .Backend )
7677}
7778
7879// RefreshUnits overwrites local unit files with those requested.
79- func (c * Client ) RefreshUnits () error {
80- return cmd .RefreshUnits ()
80+ func (c * Client ) RefreshUnits (argv [] string ) error {
81+ return cmd .RefreshUnits (argv )
8182}
8283
8384// Restart stops and then starts components.
84- func (c * Client ) Restart (targets []string ) error {
85- return cmd .Restart (c .Backend , targets )
85+ func (c * Client ) Restart (argv []string ) error {
86+ return cmd .Restart (argv , c .Backend )
8687}
8788
8889// Scale grows or shrinks the number of running components.
89- func (c * Client ) Scale (targets []string ) error {
90- return cmd .Scale (c .Backend , targets )
90+ func (c * Client ) Scale (argv []string ) error {
91+ return cmd .Scale (argv , c .Backend )
9192}
9293
9394// Start activates the specified components.
94- func (c * Client ) Start (targets []string ) error {
95- return cmd .Start (c .Backend , targets )
95+ func (c * Client ) Start (argv []string ) error {
96+ return cmd .Start (argv , c .Backend )
9697}
9798
98- // Status prints the current state of components.
99- func (c * Client ) Status (targets []string ) error {
100- return cmd .Status (c .Backend , targets )
99+ // Status prints the current status of components.
100+ func (c * Client ) Status (argv []string ) error {
101+ return cmd .Status (argv , c .Backend )
101102}
102103
103104// Stop deactivates the specified components.
104- func (c * Client ) Stop (targets []string ) error {
105- return cmd .Stop (c .Backend , targets )
105+ func (c * Client ) Stop (argv []string ) error {
106+ return cmd .Stop (argv , c .Backend )
106107}
107108
108- // Uninstall unloads components' definitions.
109- func (c * Client ) Uninstall (targets []string ) error {
110- return cmd .Uninstall (c .Backend , targets )
109+ // Uninstall unloads the definitions of the specified components.
110+ // After Uninstall, the components will be unavailable until Install is called.
111+ func (c * Client ) Uninstall (argv []string ) error {
112+ return cmd .Uninstall (argv , c .Backend )
111113}
112114
113115// Update changes the platform version on a cluster host.
114- func (c * Client ) Update () error {
115- return cmd .Update ()
116+ func (c * Client ) Update (argv [] string ) error {
117+ return cmd .Update (argv )
116118}
0 commit comments