Package cloud.quasarch.akash.impl
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 Summary
Modifier and TypeMethodDescriptionio.vavr.control.Either<OperationFailure,Deployment> closedDeployment(String leaseId) OPEN QUESTION: LEASE ID OR DEPLOYMENT_ID?io.vavr.control.Either<OperationFailure,Deployment> createDeployment(Path sdlFile) Create a deployment based on an SDL file.io.vavr.control.Either<OperationFailure,DeploymentLease> R_06 Provides lease creation capabilitiesio.vavr.control.Either<OperationFailure,Bid> getBid(String owner, String deploymentSequence, String groupSequence, String orderSequence, String providerId) io.vavr.control.Either<OperationFailure,Deployment> getDeployment(String owner, String deploymentSequence) Fetches deployment info for the given deployment id.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.io.vavr.control.Either<OperationFailure,Iterable<Bid>> listBids(String owner, String deploymentSequence, String groupSequence, String oSeq, String providerId, String state) Get the list of bids based on a set of filters.io.vavr.control.Either<OperationFailure,Iterable<Deployment>> listDeployments(String owner, String state, String deploymentSequence) List all the deployment for given ( optional ) filters.io.vavr.control.Either<OperationFailure,Iterable<DeploymentLease>> listLeases(String owner, String deploymentSequence, String groupSequence, String orderSequence, String provider, String state) List all the leases for a given filter setio.vavr.control.Either<OperationFailure,?> sendManifest(Path sdlFile) TODO SPEC R_08 Provides a way for a manifest/SDL file to be send.io.vavr.control.Either<OperationFailure,?> updateManifest(Path sdlFile) TODO SPEC R_09 updates the descriptor of an already deployment
-
Method Details
-
createDeployment
Create a deployment based on an SDL file. Request through RPC.- Parameters:
sdlFile- Path to the template file * @return EitherOperationFailureor - if successful -Deployment- Returns:
- Either with
Deploymentor with 'left' failure containingOperationFailure
-
closedDeployment
OPEN QUESTION: LEASE ID OR DEPLOYMENT_ID?Close a deployment.
- Parameters:
leaseId- The id of the lease which will be terminated * @return EitherOperationFailureor - if successful -Deployment- Returns:
- Either with
Deploymentor with 'left' failure containingOperationFailure - Implementation Note:
- Request through RPC
-
createLease
io.vavr.control.Either<OperationFailure,DeploymentLease> createLease()R_06 Provides lease creation capabilities- Returns:
- TBD
-
sendManifest
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
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 forstate- Filter for deployments in state.deploymentSequence- Deployment sequence number. This is a filter, not required- Returns:
- Either
OperationFailureor - 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, mandatorydeploymentSequence- Deployment sequence, mandatory- Returns:
- Either
OperationFailureor - 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 biddeploymentSequence- The deployment sequencegroupSequence- 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 providerstate- ??- Returns:
- Either
OperationFailureor - if successful - anIterable<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 requesterdeploymentSequence- mandatory, the deployment sequencegroupSequence- group sequence, defaults to 1 if not providedorderSequence- order sequence, defaults to 1 if not providedproviderId- id of the provider where the bid was made- Returns:
- Either the
Bidobject or theOperationFailureon 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 sequencegroupSequence- sequence which identifies deployment grouporderSequence- sequence of the deployment orderowner- the account address of the lease ownerprovider- identification of the provider where the lease was made- Returns:
- Either
OperationFailureor - 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 ownerdeploymentSequence- the deployment sequencegroupSequence- the group sequenceorderSequence- the order sequenceprovider- identification of the provider where the lease was madestate- state can be one of ( completed, active, open )- Returns:
- Can be a
DeploymentLeaseiterable, or a failure
-