github.com/bdwilliams/libcompose@v0.3.1-0.20160826154243-d81a9bdacff0/project/project_start.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  // Start starts the specified services (like docker start).
    10  func (p *Project) Start(ctx context.Context, services ...string) error {
    11  	return p.perform(events.ProjectStartStart, events.ProjectStartDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) {
    12  		wrapper.Do(wrappers, events.ServiceStartStart, events.ServiceStart, func(service Service) error {
    13  			return service.Start(ctx)
    14  		})
    15  	}), nil)
    16  }