@Service public class DefaultStreamService extends Object implements StreamService
StreamDeploymentRequest
.
If the deployment uses Skipper, delegate to SkipperStreamDeployer
, otherwise
use AppDeployerStreamDeployer
.
Constructor and Description |
---|
DefaultStreamService(StreamDefinitionRepository streamDefinitionRepository,
StreamDeploymentRepository streamDeploymentRepository,
AppDeployerStreamDeployer appDeployerStreamDeployer,
SkipperStreamDeployer skipperStreamDeployer,
AppDeploymentRequestCreator appDeploymentRequestCreator) |
Modifier and Type | Method and Description |
---|---|
String |
convertPropertiesToSkipperYaml(String streamName,
Map<String,String> updateProperties) |
void |
deployStream(String name,
Map<String,String> deploymentProperties)
Deploys the stream with the user provided deployment properties.
|
void |
rollbackStream(String streamName,
int releaseVersion)
Rollback the stream to the previous or a specific version of the stream.
|
Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> |
state(List<StreamDefinition> streamDefinitions)
Retrieve the deployment state for the given stream definitions.
|
void |
undeployStream(String streamName)
Un-deploys the stream identified by the given stream name.
|
void |
updateStream(String streamName,
String releaseName,
org.springframework.cloud.skipper.domain.PackageIdentifier packageIdenfier,
Map<String,String> updateProperties) |
void |
updateStream(String streamName,
UpdateStreamRequest updateStreamRequest)
Update the stream using the UpdateStreamRequest.
|
public DefaultStreamService(StreamDefinitionRepository streamDefinitionRepository, StreamDeploymentRepository streamDeploymentRepository, AppDeployerStreamDeployer appDeployerStreamDeployer, SkipperStreamDeployer skipperStreamDeployer, AppDeploymentRequestCreator appDeploymentRequestCreator)
public void deployStream(String name, Map<String,String> deploymentProperties)
StreamService
deployStream
in interface StreamService
name
- the name of the streamdeploymentProperties
- deployment properties to use as passed in from the client.public void undeployStream(String streamName)
StreamService
undeployStream
in interface StreamService
streamName
- the name of the stream to un-deploypublic void updateStream(String streamName, UpdateStreamRequest updateStreamRequest)
StreamService
updateStream
in interface StreamService
streamName
- the name of the stream to updateupdateStreamRequest
- the UpdateStreamRequest to use during the updatepublic void updateStream(String streamName, String releaseName, org.springframework.cloud.skipper.domain.PackageIdentifier packageIdenfier, Map<String,String> updateProperties)
public void rollbackStream(String streamName, int releaseVersion)
StreamService
rollbackStream
in interface StreamService
streamName
- the name of the stream to rollbackreleaseVersion
- the version to rollback to (if not specified, rollback to the previous deleted/deployed
release version of the stream.public String convertPropertiesToSkipperYaml(String streamName, Map<String,String> updateProperties)
public Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> state(List<StreamDefinition> streamDefinitions)
StreamService
state
in interface StreamService
streamDefinitions
- the list of Stream definitions to calculate the deployment states.Copyright © 2017 Pivotal Software, Inc.. All rights reserved.