Interface Akash

All Known Implementing Classes:
AkashClient

public interface Akash

Akash is an open network that lets users buy and sell computing resources securely and efficiently. Purpose-built for public utility.

This client supports operations highlighted in ...

Open questions: Should we really use Either in this interface?
  • Method Details

    • createDeployment

      io.vavr.control.Either<OperationFailure,Deployment> createDeployment(Path sdlFile)
      Create a deployment based on an SDL file. Request through RPC.
      Parameters:
      sdlFile - Path to the template file * @return Either OperationFailure or - if successful - Deployment
      Returns:
      Either with Deployment or with 'left' failure containing OperationFailure
    • closedDeployment

      io.vavr.control.Either<OperationFailure,Deployment> closedDeployment(String leaseId)
      OPEN QUESTION: LEASE ID OR DEPLOYMENT_ID?

      Close a deployment.

      Parameters:
      leaseId - The id of the lease which will be terminated * @return Either OperationFailure or - if successful - Deployment
      Returns:
      Either with Deployment or with 'left' failure containing OperationFailure
      Implementation Note:
      Request through RPC
    • createLease

      io.vavr.control.Either<OperationFailure,DeploymentLease> createLease()
      R_06 Provides lease creation capabilities
      Returns:
      TBD
    • sendManifest

      io.vavr.control.Either<OperationFailure,?> sendManifest(Path sdlFile)
      TODO SPEC R_08 Provides a way for a manifest/SDL file to be send. Part of the deployment process
      Parameters:
      sdlFile - the path for the deployment file descriptor
      Returns:
      TBD
    • updateManifest

      io.vavr.control.Either<OperationFailure,?> updateManifest(Path sdlFile)
      TODO SPEC R_09 updates the descriptor of an already deployment
      Parameters:
      sdlFile - the path for the deployment file descriptor
      Returns:
      TBD
    • listDeployments

      io.vavr.control.Either<OperationFailure,Iterable<Deployment>> listDeployments(@Nullable String owner, @Nullable String state, @Nullable String deploymentSequence)
      List all the deployment for given ( optional ) filters. Clients should know that the returned iterable might need to fetch more data from upstream.
      Parameters:
      owner - The owner to filter for
      state - Filter for deployments in state.
      deploymentSequence - Deployment sequence number. This is a filter, not required
      Returns:
      Either OperationFailure or - if successful - Iterable<Deployment>
    • getDeployment

      io.vavr.control.Either<OperationFailure,Deployment> getDeployment(String owner, String deploymentSequence)
      Fetches deployment info for the given deployment id.
      Parameters:
      owner - owner, mandatory
      deploymentSequence - Deployment sequence, mandatory
      Returns:
      Either OperationFailure or - if successful - Deployment
      Implementation Requirements:
      Request through REST.
    • listBids

      io.vavr.control.Either<OperationFailure,Iterable<Bid>> listBids(@Nullable String owner, @Nullable String deploymentSequence, @Nullable String groupSequence, @Nullable String oSeq, @Nullable String providerId, @Nullable String state)
      Get the list of bids based on a set of filters.
      Parameters:
      owner - owner of the bid
      deploymentSequence - The deployment sequence
      groupSequence - GSEQ is used to distinguish “groups” of containers in a deployment. Each group can be leased independently - orders, bids, and leases all act on a single group.
      oSeq - Akash OSEQ is used to distinguish multiple orders associated with a single deployment.
      providerId - identification of the provider
      state - ??
      Returns:
      Either OperationFailure or - if successful - an Iterable<Bid>
      Implementation Requirements:
      Request through REST.
    • getBid

      io.vavr.control.Either<OperationFailure,Bid> getBid(String owner, String deploymentSequence, @Nullable String groupSequence, @Nullable String orderSequence, String providerId)
      Parameters:
      owner - mandatory, the account of the bid requester
      deploymentSequence - mandatory, the deployment sequence
      groupSequence - group sequence, defaults to 1 if not provided
      orderSequence - order sequence, defaults to 1 if not provided
      providerId - id of the provider where the bid was made
      Returns:
      Either the Bid object or the OperationFailure on failure
    • getLease

      io.vavr.control.Either<OperationFailure,DeploymentLease> getLease(String owner, String deploymentSequence, String groupSequence, String orderSequence, String provider)
      Get lease Get information regarding a lease such as its status.
      Parameters:
      deploymentSequence - The deployment sequence
      groupSequence - sequence which identifies deployment group
      orderSequence - sequence of the deployment order
      owner - the account address of the lease owner
      provider - identification of the provider where the lease was made
      Returns:
      Either OperationFailure or - if successful - DeploymentLease
    • listLeases

      io.vavr.control.Either<OperationFailure,Iterable<DeploymentLease>> listLeases(@Nullable String owner, @Nullable String deploymentSequence, @Nullable String groupSequence, @Nullable String orderSequence, @Nullable String provider, @Nullable String state)
      List all the leases for a given filter set
      Parameters:
      owner - the account address of the lease owner
      deploymentSequence - the deployment sequence
      groupSequence - the group sequence
      orderSequence - the order sequence
      provider - identification of the provider where the lease was made
      state - state can be one of ( completed, active, open )
      Returns:
      Can be a DeploymentLease iterable, or a failure