@RestController @RequestMapping(value="/streams/deployments") @ExposesResourceFor(value=StreamDeploymentResource.class) public class StreamDeploymentController extends Object
StreamDefinition
s. Support for stream
update, rollback, and update history by delegating to StreamService
.Constructor and Description |
---|
StreamDeploymentController(StreamDefinitionRepository repository,
StreamService streamService,
StreamDefinitionService streamDefinitionService)
Construct a new UpdatableStreamDeploymentController, given a
StreamDeploymentController and StreamService and StreamDefinitionService |
Modifier and Type | Method and Description |
---|---|
ResponseEntity<Void> |
deploy(String name,
Map<String,String> properties)
Request deployment of an existing stream definition.
|
Collection<org.springframework.cloud.skipper.domain.Release> |
history(String releaseName) |
StreamDeploymentResource |
info(String name,
boolean reuseDeploymentProperties)
Request deployment of an existing stream definition.
|
ResponseEntity<String> |
manifest(String name,
Integer version) |
Collection<org.springframework.cloud.skipper.domain.Deployer> |
platformList() |
ResponseEntity<Void> |
rollback(String name,
Integer version) |
ResponseEntity<Void> |
scaleApplicationInstances(String streamName,
String appName,
Integer count,
Map<String,String> properties)
Scale application instances in a deployed stream.
|
ResponseEntity<Void> |
undeploy(String name)
Request un-deployment of an existing stream.
|
ResponseEntity<Void> |
undeployAll()
Request un-deployment of all streams.
|
ResponseEntity<Void> |
update(String name,
UpdateStreamRequest updateStreamRequest) |
public StreamDeploymentController(StreamDefinitionRepository repository, StreamService streamService, StreamDefinitionService streamDefinitionService)
StreamDeploymentController
and StreamService
and StreamDefinitionService
repository
- the repository this controller will use for stream CRUD operationsstreamService
- the underlying UpdatableStreamService to deploy the streamstreamDefinitionService
- the StreamDefinitionService@RequestMapping(value="/scale/{streamName}/{appName}/instances/{count}", method=POST) public ResponseEntity<Void> scaleApplicationInstances(@PathVariable(value="streamName") String streamName, @PathVariable(value="appName") String appName, @PathVariable(value="count") Integer count, @RequestBody(required=false) Map<String,String> properties)
streamName
- the name of an existing stream definition (required)appName
- in stream application name to scale (required)count
- number of instances for the selected stream application (required)properties
- scale deployment specific properties (optional)@RequestMapping(value="/update/{name}", method=POST) public ResponseEntity<Void> update(@PathVariable(value="name") String name, @RequestBody UpdateStreamRequest updateStreamRequest)
@RequestMapping(value="/rollback/{name}/{version}", method=POST) public ResponseEntity<Void> rollback(@PathVariable(value="name") String name, @PathVariable(value="version") Integer version)
@RequestMapping(value="/manifest/{name}/{version}", method=GET) public ResponseEntity<String> manifest(@PathVariable(value="name") String name, @PathVariable(value="version") Integer version)
@RequestMapping(path="/history/{name}", method=GET) @ResponseStatus(value=OK) public Collection<org.springframework.cloud.skipper.domain.Release> history(@PathVariable(value="name") String releaseName)
@RequestMapping(path="/platform/list", method=GET) @ResponseStatus(value=OK) public Collection<org.springframework.cloud.skipper.domain.Deployer> platformList()
@RequestMapping(value="/{name}", method=DELETE) public ResponseEntity<Void> undeploy(@PathVariable(value="name") String name)
name
- the name of an existing stream (required)@RequestMapping(value="", method=DELETE) public ResponseEntity<Void> undeployAll()
ResponseEntity
@RequestMapping(value="/{name}", method=GET) @ResponseStatus(value=OK) public StreamDeploymentResource info(@PathVariable(value="name") String name, @RequestParam(value="reuse-deployment-properties",required=false) boolean reuseDeploymentProperties)
name
- the name of an existing stream definition (required)reuseDeploymentProperties
- Indicator to re-use deployment properties.@RequestMapping(value="/{name}", method=POST) public ResponseEntity<Void> deploy(@PathVariable(value="name") String name, @RequestBody(required=false) Map<String,String> properties)
name
- the name of an existing stream definition (required)properties
- the deployment properties for the stream as a comma-delimited list of
key=value pairsCopyright © 2024 Pivotal Software, Inc.. All rights reserved.