Interface StreamOperations

All Known Implementing Classes:
StreamTemplate

public interface StreamOperations
Interface defining operations available against streams.
Author:
Eric Bottard, Ilayaperumal Gopinathan, Mark Fisher
  • Method Details

    • list

      org.springframework.hateoas.PagedModel<StreamDefinitionResource> list()
      Returns:
      the list streams known to the system.
    • info

      Parameters:
      name - the name of the stream
      Returns:
      retrieve the stream info.
    • createStream

      StreamDefinitionResource createStream(String name, String definition, String description, boolean deploy)
      Create a new stream, optionally deploying it.
      Parameters:
      name - the name of the stream
      definition - the stream definition DSL
      description - the description of the stream
      deploy - whether to deploy the stream after creating its definition
      Returns:
      the new stream definition
    • deploy

      void deploy(String name, Map<String,String> properties)
      Deploy an already created stream.
      Parameters:
      name - the name of the stream
      properties - the deployment properties
    • undeploy

      void undeploy(String name)
      Undeploy a deployed stream, retaining its definition.
      Parameters:
      name - the name of the stream
    • undeployAll

      void undeployAll()
      Undeploy all currently deployed streams.
    • destroy

      void destroy(String name)
      Destroy an existing stream.
      Parameters:
      name - the name of the stream
    • destroyAll

      void destroyAll()
      Destroy all streams known to the system.
    • updateStream

      void updateStream(String streamName, String releaseName, org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier, Map<String,String> updateProperties, boolean force, List<String> appNames)
      Update the stream given its corresponding releaseName in Skipper using the specified package and updated yaml config.
      Parameters:
      streamName - the name of the stream to update
      releaseName - the corresponding release name of the stream in skipper
      packageIdentifier - the package that corresponds to this stream
      updateProperties - a map of properties to use for updating the stream
      force - boolean flag to indicate if the stream update is enforced irrespective of differences from the existing stream
      appNames - app names to use for the stream update when update is enforced
    • rollbackStream

      void rollbackStream(String streamName, int version)
      Rollback the stream to the previous or a specific release version.
      Parameters:
      streamName - the name of the stream to rollback
      version - the version to rollback to. If the version is 0, then rollback to the previous release. The version can not be less than zero.
    • getStreamDefinition

      StreamDefinitionResource getStreamDefinition(String streamName)
      Queries the server for the stream definition.
      Parameters:
      streamName - the name of the stream to get status
      Returns:
      The current stream definition with updated status
    • getManifest

      String getManifest(String streamName, int version)
      Get manifest for the given stream deployed via Skipper. Optionally, the version can be used to retrieve the version for a specific version of the stream.
      Parameters:
      streamName - the stream(release) name
      version - the version of the release
      Returns:
      the manifest for the given stream and version
    • history

      Collection<org.springframework.cloud.skipper.domain.Release> history(String streamName)
      Get the history of releases for the given stream deployed via Skipper.
      Parameters:
      streamName - the stream(release) name
      Returns:
      the history of releases for the stream
    • listPlatforms

      Collection<org.springframework.cloud.skipper.domain.Deployer> listPlatforms()
      Returns:
      the list of all Skipper platforms
    • validateStreamDefinition

      StreamAppStatusResource validateStreamDefinition(String streamDefinitionName) throws OperationNotSupportedException
      Return the validation status for the apps in an stream.
      Parameters:
      streamDefinitionName - The name of the stream definition to be validated.
      Returns:
      StreamAppStatusResource containing the stream app statuses.
      Throws:
      OperationNotSupportedException - if the server does not support stream validation
    • scaleApplicationInstances

      void scaleApplicationInstances(String streamName, String appName, Integer count, Map<String,String> properties)
      Scales number of application instances in a stream.
      Parameters:
      streamName - the stream(release) name.
      appName - name of application in the stream to scale.
      count - number of instances to scale to.
      properties - scale deployment properties.
    • streamExecutionLog

      String streamExecutionLog(String streamName)
      Retrieves all the applications' logs for the given stream name
      Parameters:
      streamName - name of stream for which to get logs
      Returns:
      logs of said stream
    • streamExecutionLog

      String streamExecutionLog(String streamName, String appName)
      Retrieve the logs of a specific application from the stream
      Parameters:
      streamName - name of stream for which to get logs
      appName - app name for which to get logs
      Returns:
      logs for said application within said stream