public class StreamTemplate extends Object implements StreamOperations
StreamOperations
.Modifier and Type | Field and Description |
---|---|
static String |
DEFINITIONS_REL |
Modifier and Type | Method and Description |
---|---|
StreamDefinitionResource |
createStream(String name,
String definition,
boolean deploy)
Create a new stream, optionally deploying it.
|
void |
deploy(String name,
Map<String,String> properties)
Deploy an already created stream.
|
void |
destroy(String name)
Destroy an existing stream.
|
void |
destroyAll()
Destroy all streams known to the system.
|
String |
getManifest(String streamName,
int version)
Get manifest for the given stream deployed via Skipper.
|
StreamDefinitionResource |
getStreamDefinition(String streamName)
Queries the server for the stream definition.
|
Collection<org.springframework.cloud.skipper.domain.Release> |
history(String streamName)
Get the history of releases for the given stream deployed via Skipper.
|
StreamDeploymentResource |
info(String name) |
StreamDefinitionResource.Page |
list() |
Collection<org.springframework.cloud.skipper.domain.Deployer> |
listPlatforms() |
void |
rollbackStream(String streamName,
int version)
Rollback the stream to the previous or a specific release version.
|
void |
undeploy(String name)
Undeploy a deployed stream, retaining its definition.
|
void |
undeployAll()
Undeploy all currently deployed streams.
|
void |
updateStream(String streamName,
String releaseName,
org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier,
Map<String,String> updateProperties)
Update the stream given its corresponding releaseName in Skipper using the specified
package and updated yaml config.
|
public static final String DEFINITIONS_REL
public StreamDefinitionResource.Page list()
list
in interface StreamOperations
public StreamDeploymentResource info(String name)
info
in interface StreamOperations
name
- the name of the streampublic StreamDefinitionResource createStream(String name, String definition, boolean deploy)
StreamOperations
createStream
in interface StreamOperations
name
- the name of the streamdefinition
- the stream definition DSLdeploy
- whether to deploy the stream after creating its definitionpublic void deploy(String name, Map<String,String> properties)
StreamOperations
deploy
in interface StreamOperations
name
- the name of the streamproperties
- the deployment propertiespublic void undeploy(String name)
StreamOperations
undeploy
in interface StreamOperations
name
- the name of the streampublic void undeployAll()
StreamOperations
undeployAll
in interface StreamOperations
public void destroy(String name)
StreamOperations
destroy
in interface StreamOperations
name
- the name of the streampublic void destroyAll()
StreamOperations
destroyAll
in interface StreamOperations
public void updateStream(String streamName, String releaseName, org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier, Map<String,String> updateProperties)
StreamOperations
updateStream
in interface StreamOperations
streamName
- the name of the stream to updatereleaseName
- the corresponding release name of the stream in skipperpackageIdentifier
- the package that corresponds to this streamupdateProperties
- a map of properties to use for updating the streampublic void rollbackStream(String streamName, int version)
StreamOperations
rollbackStream
in interface StreamOperations
streamName
- the name of the stream to rollbackversion
- the version to rollback to. If the version is 0, then rollback to the previous release.
The version can not be less than zero.public String getManifest(String streamName, int version)
StreamOperations
getManifest
in interface StreamOperations
streamName
- the stream(release) nameversion
- the version of the releasepublic Collection<org.springframework.cloud.skipper.domain.Release> history(String streamName)
StreamOperations
history
in interface StreamOperations
streamName
- the stream(release) namepublic Collection<org.springframework.cloud.skipper.domain.Deployer> listPlatforms()
listPlatforms
in interface StreamOperations
public StreamDefinitionResource getStreamDefinition(String streamName)
StreamOperations
getStreamDefinition
in interface StreamOperations
streamName
- the name of the stream to get statusCopyright © 2019 Pivotal Software, Inc.. All rights reserved.