1
0
mirror of https://github.com/rancher/os.git synced 2025-07-06 03:26:12 +00:00
os/vendor/github.com/docker/libcompose/docker/service_factory.go
2016-05-23 17:22:40 -07:00

17 lines
508 B
Go

package docker
import (
"github.com/docker/libcompose/config"
"github.com/docker/libcompose/project"
)
// ServiceFactory is an implementation of project.ServiceFactory.
type ServiceFactory struct {
context *Context
}
// Create creates a Service based on the specified project, name and service configuration.
func (s *ServiceFactory) Create(project *project.Project, name string, serviceConfig *config.ServiceConfig) (project.Service, error) {
return NewService(name, serviceConfig, s.context), nil
}