Update ConvertService for external usage 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2017-06-08 10:44:05 +02:00
parent 583ed2e3be
commit 96dc07a8cf
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) 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 { if err != nil {
return nil, errors.Wrapf(err, "service %s", service.Name) return nil, errors.Wrapf(err, "service %s", service.Name)
} }
@ -51,7 +51,8 @@ func Services(
return result, nil return result, nil
} }
func convertService( // Service converts a ServiceConfig into a swarm ServiceSpec
func Service(
apiVersion string, apiVersion string,
namespace Namespace, namespace Namespace,
service composetypes.ServiceConfig, service composetypes.ServiceConfig,