Interface StreamService

All Known Implementing Classes:
DefaultStreamService

public interface StreamService
Provide deploy, undeploy, info and state operations on the stream. Uses the support for operations provided by Skipper.
Author:
Mark Pollack, Ilayaperumal Gopinathan, Christian Tzolov
  • Method Details

    • scaleApplicationInstances

      void scaleApplicationInstances(String streamName, String appName, int count, Map<String,String> properties)
      Scale application instances in a deployed stream.
      Parameters:
      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)
    • updateStream

      void updateStream(String streamName, UpdateStreamRequest updateStreamRequest)
      Update the stream using the UpdateStreamRequest.
      Parameters:
      streamName - the name of the stream to update
      updateStreamRequest - the UpdateStreamRequest to use during the update
    • rollbackStream

      void rollbackStream(String streamName, int releaseVersion)
      Rollback the stream to the previous or a specific version of the stream.
      Parameters:
      streamName - the name of the stream to rollback
      releaseVersion - the version to rollback to (if not specified, rollback to the previous deleted/deployed release version of the stream.
    • manifest

      String manifest(String releaseName, int releaseVersion)
      Return a manifest info of a release version. For packages with dependencies, the manifest includes the contents of those dependencies.
      Parameters:
      releaseName - the release name
      releaseVersion - the release version
      Returns:
      the manifest info of a release
    • history

      Collection<org.springframework.cloud.skipper.domain.Release> history(String releaseName)
      Get stream's deployment history
      Parameters:
      releaseName - Stream release name
      Returns:
      List or Releases for this release name
    • platformList

      Collection<org.springframework.cloud.skipper.domain.Deployer> platformList()
      Returns:
      list of supported deployment platforms
    • createStream

      StreamDefinition createStream(String streamName, String dsl, String description, boolean deploy, Map<String,String> deploymentProperties)
      Create a new stream.
      Parameters:
      streamName - stream name
      dsl - DSL definition for stream
      description - description of the stream definition
      deploy - if true, the stream is deployed upon creation (default is false)
      deploymentProperties - the optional deployment properties to use when the stream is deployed upon creation
      Returns:
      the created stream definition already exists
      Throws:
      InvalidStreamDefinitionException - if there are errors in parsing the stream DSL, resolving the name, or type of applications in the stream
    • deployStream

      void deployStream(String name, Map<String,String> deploymentProperties)
      Deploys the stream with the user provided deployment properties. Implementations are responsible for expanding deployment wildcard expressions.
      Parameters:
      name - the name of the stream
      deploymentProperties - deployment properties to use as passed in from the client.
    • undeployStream

      void undeployStream(String name)
      Un-deploys the stream identified by the given stream name.
      Parameters:
      name - the name of the stream to un-deploy
    • deleteStream

      void deleteStream(String name)
      Delete the stream, including undeloying.
      Parameters:
      name - the name of the stream to delete
    • deleteAll

      void deleteAll()
      Delete all streams, including undeploying.
    • state

      Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> state(List<StreamDefinition> streamDefinitions)
      Retrieve the deployment state for list of stream definitions.
      Parameters:
      streamDefinitions - the list of Stream definitions to calculate the deployment states.
      Returns:
      the map containing the stream definitions and their deployment states.
    • info

      StreamDeployment info(String streamName)
      Get stream information including the deployment properties etc.
      Parameters:
      streamName - the name of the stream
      Returns:
      the stream deployment information
    • findRelatedStreams

      List<StreamDefinition> findRelatedStreams(String name, boolean nested)
      Find streams related to the given stream name.
      Parameters:
      name - name of the stream
      nested - if should recursively findByTaskNameContains for related stream definitions
      Returns:
      a list of related stream definitions
    • findDefinitionByNameContains

      org.springframework.data.domain.Page<StreamDefinition> findDefinitionByNameContains(org.springframework.data.domain.Pageable pageable, String search)
      Find stream definitions where the findByTaskNameContains parameter
      Parameters:
      pageable - Pagination information
      search - the findByTaskNameContains parameter to use
      Returns:
      Page of stream definitions
    • findOne

      StreamDefinition findOne(String streamDefinitionName)
      Find a stream definition by name.
      Parameters:
      streamDefinitionName - the name of the stream definition
      Returns:
      the stream definition
      Throws:
      NoSuchStreamDefinitionException - if the definition can not be found.
    • validateStream

      ValidationStatus validateStream(String name)
      Verifies that all apps in the stream are valid.
      Parameters:
      name - the name of the definition
      Returns:
      ValidationStatus for a stream.