Skip to content
This repository has been archived by the owner on Dec 21, 2018. It is now read-only.

Adding services parameters in methods. #6

Merged
merged 5 commits into from
Sep 6, 2017

Conversation

nmengin
Copy link
Contributor

@nmengin nmengin commented Sep 5, 2017

This feature allows users to add services as parameters when project is started/stopped.
The pause/unpause methods are added in the way to separate :

  • Service create and service start actions
  • Service stop and service delete actions

…mpose file, Add pause/unpause methods to start without creating and stop without deleting services.
compose.go Outdated
// Stop shuts down and clean the project
func (p *Project) Stop() error {
// FIXME(vdemeester) handle timeout
func (p *Project) Pause(services ...string) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method Project.Pause should have comment or be unexported

compose.go Outdated
return p.UnPause(services...)
}

func (p *Project) UnPause(services ...string) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported method Project.UnPause should have comment or be unexported

@codecov
Copy link

codecov bot commented Sep 6, 2017

Codecov Report

Merging #6 into master will not change coverage.
The diff coverage is 0%.

@@         Coverage Diff          @@
##           master    #6   +/-   ##
====================================
  Coverage       0%    0%           
====================================
  Files           1     1           
  Lines          91   125   +34     
====================================
- Misses         91   125   +34

1 similar comment
@codecov
Copy link

codecov bot commented Sep 6, 2017

Codecov Report

Merging #6 into master will not change coverage.
The diff coverage is 0%.

@@         Coverage Diff          @@
##           master    #6   +/-   ##
====================================
  Coverage       0%    0%           
====================================
  Files           1     1           
  Lines          91   125   +34     
====================================
- Misses         91   125   +34

compose.go Outdated
return p.UnPause(services...)
}

// Unpause only starts created services which are stopped.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment on exported method Project.UnPause should be of the form "UnPause ..."

compose.go Outdated
}

// UnPause only starts created services which are stopped.
func (p *Project) UnPause(services ...string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 pause/unpause are already docker and docker-compose commands so I think it's the wrong name for the method here (i.e. it's going to be confusing).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, does it need to be exported ? 👼

compose.go Outdated
func (p *Project) Stop() error {
// FIXME(vdemeester) handle timeout
// Pause only stop services without delete them.
func (p *Project) Pause(services ...string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants