github.com/bdwilliams/libcompose@v0.3.1-0.20160826154243-d81a9bdacff0/project/project_stop.go (about) 1 package project 2 3 import ( 4 "golang.org/x/net/context" 5 6 "github.com/docker/libcompose/project/events" 7 ) 8 9 // Stop stops the specified services (like docker stop). 10 func (p *Project) Stop(ctx context.Context, timeout int, services ...string) error { 11 return p.perform(events.ProjectStopStart, events.ProjectStopDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 12 wrapper.Do(nil, events.ServiceStopStart, events.ServiceStop, func(service Service) error { 13 return service.Stop(ctx, timeout) 14 }) 15 }), nil) 16 }