Merge pull request #163 from vdemeester/export-convertservice

Update ConvertService for external usage 👼
This commit is contained in:
Vincent Demeester 2017-06-08 10:55:56 +02:00 committed by GitHub
commit c944d20b1f
1 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ func Services(
return nil, errors.Wrapf(err, "service %s", service.Name)
}
serviceSpec, err := convertService(client.ClientVersion(), namespace, service, networks, volumes, secrets, configs)
serviceSpec, err := Service(client.ClientVersion(), namespace, service, networks, volumes, secrets, configs)
if err != nil {
return nil, errors.Wrapf(err, "service %s", service.Name)
}
@ -51,7 +51,8 @@ func Services(
return result, nil
}
func convertService(
// Service converts a ServiceConfig into a swarm ServiceSpec
func Service(
apiVersion string,
namespace Namespace,
service composetypes.ServiceConfig,