Interface PackagesManagement

All Known Implementing Classes:
PackagesManagementImpl

public interface PackagesManagement
PackagesManagement provides a way to manage the packages of function, sink, and source.
  • Method Details

    • initialize

      void initialize(PackagesStorage storage)
      Initialize the packages management service with the given storage.
      Parameters:
      storage - the storage used to saving packages
    • getMeta

      Get the metadata of a package.
      Parameters:
      packageName - package name
      Returns:
    • updateMeta

      CompletableFuture<Void> updateMeta(PackageName packageName, PackageMetadata metadata)
      Update the metadata of a package.
      Parameters:
      packageName - package name
      metadata -
      Returns:
    • download

      CompletableFuture<Void> download(PackageName packageName, OutputStream outputStream)
      Download a package of a given version to a given path.
      Parameters:
      packageName - package name
      outputStream -
      Returns:
    • upload

      CompletableFuture<Void> upload(PackageName packageName, PackageMetadata metadata, InputStream inputStream)
      Upload a package of a given version from a given path.
      Parameters:
      packageName - package name
      metadata - metadata of a package
      inputStream -
      Returns:
    • delete

      CompletableFuture<Void> delete(PackageName packageName)
      Delete a package. It will delete all versions of a package if the version is not specified. Otherwise it will delete the specified version package.
      Parameters:
      packageName - package name type://tenant/namespace/name@version is delete a given version of the package type://tenant/namespace/name is delete all versions of the package
      Returns:
    • list

      List all the versions of a package.
      Parameters:
      packageName - package name without version
      Returns:
      all the versions of the specified package
    • list

      CompletableFuture<List<String>> list(PackageType type, String tenant, String namespace)
      List all the packages with the type of a namespace.
      Parameters:
      type - the package type
      tenant - the tenant name
      namespace - the namespace name
      Returns:
      the packages name under the specified namespace